asp_web_howto thread: getting an '424' error when opening documents..
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