|
-
Aug 31st, 2000, 12:37 PM
#1
Thread Starter
New Member
Hi all,
I am trying to write a code that checks if opened document is readonly or not. Below is the code that I used:
Dim objWord As Word.Application
Set objWord = New Word.Application
If objWord.Documents("filename").ReadOnly Then
'document is readonly'
Else
'document is not readonly'
End If
It seems like object does not recognize the open document.
However, if I use same method for Powerpoint presentation, code works perfectly fine.
Does anyone have idea why above code does not work?
Thank you very much for your time.
Charles
*Microsoft Word object library is properly referenced.
-
Aug 31st, 2000, 03:58 PM
#2
Addicted Member
This property is only available to open documents. So to see it, you need to open the document first:
objWord.Documents.Open ("Path and File")
If objWord.ActiveDocument.ReadOnly Then ...
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
|