Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Tom Ho
  Where is Tom Ho?
 
 Australia
 Tom Ho
 Tags
Subject: Problem with open doc in Readonly mode
Thread ID: 228459 Message ID: 228459 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Microsoft Office Automation
Date: Tuesday, May 19, 2009 7:36:41 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

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