N
nick brandwood
I have two problems calling documents.open from access 2003 ...
the first problem is that it does not seem to disable macros even if I put
the secruity protection on very high.
opening the file directly however disables the same macro.
the second problem I have is that I am opening documents from outside
sources, and some of these documents are corrupted. When it attempts to open
a corruputed document, I get a runtime error 5121, error trapping within
Access does not block this error. should I be using a different error
trapping technique?
On Error GoTo FileErrorContinue
objApp.Documents.Open FileName:=strToBeSearched & arrFiles(n),
ReadOnly:=True, OpenAndRepair:=True, NoEncodingDialog:=True
Run.time error '5121':
Word experienced an error trying to open the file.
Try these suggestions.
* Check the file permissions for the document or drive.
* Make sure there is sufficient free memory and disk space.
* Open the file with the TextRecovery center
It is acceptable for the code to skip over any file that fails to open.
thanks,
nick
the first problem is that it does not seem to disable macros even if I put
the secruity protection on very high.
opening the file directly however disables the same macro.
the second problem I have is that I am opening documents from outside
sources, and some of these documents are corrupted. When it attempts to open
a corruputed document, I get a runtime error 5121, error trapping within
Access does not block this error. should I be using a different error
trapping technique?
On Error GoTo FileErrorContinue
objApp.Documents.Open FileName:=strToBeSearched & arrFiles(n),
ReadOnly:=True, OpenAndRepair:=True, NoEncodingDialog:=True
Run.time error '5121':
Word experienced an error trying to open the file.
Try these suggestions.
* Check the file permissions for the document or drive.
* Make sure there is sufficient free memory and disk space.
* Open the file with the TextRecovery center
It is acceptable for the code to skip over any file that fails to open.
thanks,
nick