|
-
Jul 7th, 1999, 12:00 PM
#1
Thread Starter
New Member
Dear i m trying to open a document in word which has got password. The problem is that if cancel button is pressed it gives run time error(4198) and if gives wrong password and presses ok button it gives run time error 5408.so now i want to trap these errors and so the message and exit sub .please help me. i m also sending u the code.The problem occurs in code where it tries to open the document.
With appWD.Application
.Activate 'MSWord is activated
.WindowState = wdWindowStateMaximize 'window is maximized
'Opens the required document (r/w)
.Documents.Open FileName:=txtResumeFileName.Text, ReadOnly:=False
End With
I m getting problem at .Open
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|