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
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
Comment