473,770 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Microsoft VBScript runtime error '800a01a8': Object required: 'objFolder'

13 New Member
Greetings All,

I'm new to this forum as well as to ASP. Therefore I am ready to learn from the ASP experts in this forum. Thank you very much in advance.

I was assign to develop a ASP based website, and one of the functions offer in this site is that the end user is able to print all files located in a specific folder, and the files were actually generated in the folder based on the end user selection. After printing, the files will be remove and left the folder empty. I already handled the files creation and file deletion part but what make me the most headache is the printing part. I have this chunk of code which supposed to perform the printing but it keeps returning me error of: Object required: 'objFolder'. I have no idea how to go about this and hope someone can give me some guide line. Below is my chunk of code.

TargetFolder = "C:\dummy\"
Set objShell = CreateObject("S hell.Applicatio n")
Set objFolder = objShell.Namesp ace(TargetFolde r)
Set colItems = objFolder.Items
For Each objItem in colItems
objItem.InvokeV erbEx("Print")
Next

May I know what is my mistake? Perhaps do you have any better idea on how to print all files from a folder? Thank you very much.

Best Regards
Gray d Newbie
Jul 31 '08 #1
1 10134
jeffstl
432 Recognized Expert Contributor
Here is ASP code to populate a drop down list with files from a folder.

Expand|Select|Wrap|Line Numbers
  1.   <%
  2. FolderPath = Request.ServerVariables("APPL_PHYSICAL_PATH") & "..\wwwroot\"
  3. set Folders = FSObject.GetFolder(FolderPath)
  4. set FileList = Folders.SubFolders
  5. response.write "<select name=txtClassFolder>"
  6. response.write "<option selected>Choose Folder</option>"
  7. 'LOOP THROUGH ITEM TYPES TO POPULATE DROP DOWN
  8. for each FoundFolders in FileList
  9.     response.write "<option>" 
  10.     response.write FoundFolders.name 
  11.     response.write "</option>"
  12. next
  13. response.write "</select>"                    
  14.  
  15. %>
  16.  
Aug 4 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
75021
by: Peter | last post by:
I have a program which was working fine. In it a function works out the number of .jpg files in a specified folder. I then realised that I needed to make sure the folder exists first & added the code for this. After this I get the Runtime Error 91 - Object variable not set. I've rem'd out my added code to no avail. Tried rebooting to. The earlier exe version of the program continues to work OK. The code in question is shown below. I'd...
1
4813
by: Matrix | last post by:
I just got one virtual directory setup and try to run my web application from there. I am getting following error Microsoft VBScript runtime error '800a01a8' Object required: 'Session' I even try to create test.asp and put it in wwwroot folder only code I had was <% Response.write Session.SessionID %>
1
8965
by: Carolyn Speakman | last post by:
Hi, I'm trying to amend an intranet .asp page but keep getting this error. The error only occurs when I pull the WHOLE intranet off the server and try to run it locally. The error isn't there when the page is run off the intranet server. I'm using IIS 5, I.E. 6 and WinXP Pro. Here's the code it doesn't like:
1
4174
by: Erica | last post by:
Here is the error I get. Line 13 is the 'do while f.AtEndOfStream = false' line. Your help is very much appreciated! Microsoft VBScript runtime error '800a01a8' Object required: 'f' /ifaximport.asp, line 13 Here is the code that generates the error:
1
2766
by: PaulieS | last post by:
Hi all. Am migrating a customer from IIS5 on W2K server to IIS6 on W2K3. Zipped all the websites and unzipped them to the identical locations on new server. Used IISMT to migrate metabase. Got this error when I tried to run a very basic page... code:
7
10866
by: Raj | last post by:
I have developed a component create database, sql login,pwd, create tables etc., The component is working fine with VB But the same is not working with ASP as I get this error: Error 800a01a8 For creating database, sql login,pwd I am using sa with a valid password. Please advice.
4
8848
by: Genken | last post by:
Hi can anybody help me i get this error when running this code. Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: '' And then a line number indicating where the error is, i cant see any errors with this code please assist. Thanks in advance. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
3
3260
by: Newbie19 | last post by:
I'm trying to get a list of all subfolders in a folder on a share drive, but I keep on getting this error message: Object variable or With block variable not set. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object variable or With block...
4
2529
nitindel
by: nitindel | last post by:
Hi All, Please let me know that why i am getting the error like this:- Microsoft VBScript runtime error '800a01a8' Object required /Melange/MasconNet/singlesignon.asp, line 49
0
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9453
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10099
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8929
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.