Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Borislav Borissov
  Where is Borislav Borissov?
 Sofia
 Bulgaria
 Borislav Borissov
 To: Tom Ho
  Where is Tom Ho?
 
 Australia
 Tom Ho
 Tags
Subject: RE: Problem with open doc in Readonly mode
Thread ID: 228459 Message ID: 228470 # Views: 2 # Ratings: 1
Version: Visual FoxPro 9 Category: Microsoft Office Automation
Date: Tuesday, May 19, 2009 9:04:18 AM         
   


> Hi Experts
>
> Just try to open a doc file in ReadOnly with the following codes.
>
>
lcStartNo = ATC("X:\FMISW\Accidents\Documents\", crsNote.content)
> lcDocumentLocation = ALLTRIM(SUBSTR(crsNote.content, lcStartNo))
> 
> oWord = CreateObject("Word.Application")
> 
> oDocument = oWord.Documents.Open(lcDocumentLocation, , .T.) && The third parameters is ReadOnly	
> oWord.Visible = .T.
> oWord.Activate

>
> The codes open the doc fine, but the doc never open in Readonly mode. I tried different doc files and the same thing happened. (Also tried to open a newly created doc)
>
> Is there something wrong with the codes?
>
> Regards
> Tom

It is opened in Read-Only mode. The user can make changes to the document but can not save them. The user only can use Save As and save the doc with another name or in separate folder.

-----------------
Borislav Borissov

Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.

ENTIRE THREAD

Problem with open doc in Readonly mode Posted by Tom Ho @ 5/19/2009 7:36:41 AM
RE: Problem with open doc in Readonly mode Posted by Borislav Borissov @ 5/19/2009 9:04:18 AM
RE: Problem with open doc in Readonly mode Posted by Tom Ho @ 5/19/2009 3:05:40 PM
RE: Problem with open doc in Readonly mode Posted by Borislav Borissov @ 5/19/2009 3:22:32 PM
RE: Problem with open doc in Readonly mode Posted by Tom Ho @ 5/20/2009 1:30:56 AM