?
Solved

getting an '424' error when opening documents..

Posted on 2003-03-17
3
Medium Priority
?
693 Views
Last Modified: 2007-12-19
Hi,

i've found this nice source to open documents. I only have one problem. On the last row ('if err.number = 0 then') i always get the error number 424. If I change the last row into 'if err.number=424' then this script runs fine...but i'm curious which causes error number 424 (i can't find it anywhere').

thanks,

Harold

<%
     dim objPropReader     ' Property Reading object
     dim objFileProps     ' Object that stores the file properties
     dim objFSO          ' File System Object
     dim objFile          ' File Object
     dim objFolder          ' Folder Object
     dim sMapPath          ' String to store the Real Path

     on error resume next    
     '
     ' Create File System Object to get list of files
     '
     set objFSO = createobject("Scripting.FileSystemObject")
     
     '
     ' Set the Property Reader to get the file properties
     '
     Set objPropReader = CreateObject("DSOLEFILE.PropertyReader")      
     
     '
     ' Get the NT path for the web page
     '
     sMapPath = Server.MapPath(".")
     response.write(smappath)
     '
     ' Set the folder object to the Mapped Path
     '
     
     set objFolder = objFSO.GetFolder(sMapPath)
     
     '
     ' For each file in the folder
     '
     for each objFile in objFolder.files          
          '
          ' Read the file properties so we have the Title and description.
          ' In order to do this we need to use the .PATH which contains the
          ' path and the file name.  .NAME only contains the file name.
          '
          set objFileProps= objPropReader.GetDocumentProperties(objfile.path)
          response.write "Errornummer: "&err.number&"<br><br><br>"          if err.number = 0 then
                       'the script goes on here

0
Comment
Question by:Dutch_Harold
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
farzinm earned 100 total points
ID: 8152266
I got the error number 424 too for this line
Set objPropReader = CreateObject("DSOLEFILE.PropertyReader")      
You need to be able to create this object.    
0
 
LVL 4

Expert Comment

by:farzinm
ID: 8152321
get the Dsofile.exe if you havent installed it yet from here
http://support.microsoft.com/?kbid=253338
0
 
LVL 58

Expert Comment

by:Gary
ID: 9349686
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept Answer by farzinm

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
GaryC123
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question