General information
Category:
COM/DCOM and OLE Automation
In addition to Cetin's replay you can protect document and unprotect it if needed (user will have no ability to actually write anything).
Something like:
to protect: oWord.ActiveDocument.Protect(2,.f.,lcpassword)
to unprotect: oWord.ActiveDocument.UnProtect(lcpassword)
You can call these actions depending on whether document is open already or not. Someyhing like:
lnfp=fopen("WordDoc.doc",2)
if lnfp>0
fclose(lnfp)
.....
oWord.ActiveDocument.UnProtect(lcpassword)
.......
* protect it back before closing
oWord.ActiveDocument.Protect(2,.f.,lcpassword)
......
else
.....
oWord.documents.open("WordDoc.doc",,.t.)
....
Regards
>I want to be able to open a word document even when its open by another user in read only mode, I don't want the computer to tell me if the file is already open, I want to open it anyway without any user-intervention.
>
>Anyone know how?
>
>Regards
>RC
>BSS
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only