Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Execute microsoft word from a visual foxpro program
Message
From
25/07/2007 08:52:25
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01241684
Message ID:
01243445
Views:
34
>>After some thought on the subject. I decided what I really need to do is open a word file in read/only mode so that users cannot change it. Ideally I would like to create a help file form the word file. The most important part is that they not be able to change it.
>>
>>Is that possible for vfp 9 and if so how.
>>
>>TIA
>
>Yes.
>
>Local loWord
>loWord = CREATEOBJECT("Word.Application")
>lcDocFile = GETFILE('doc')
>loWord.Documents.Open(m.lcDocFile,,.t.) && third parameter is read-only
>loWord.visible = .t.
>
>From VBA Help:
>
>expression.Open(FileName, ConfirmConversions, ReadOnly, AddToRecentFiles, PasswordDocument, PasswordTemplate, Revert, WritePasswordDocument, WritePasswordTemplate, Format, Encoding, Visible, OpenConflictDocument, OpenAndRepair , DocumentDirection, NoEncodingDialog)

However, Word's understanding is "read-only" is that you can't save back to the same file. You can still Save As a different file.

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform