Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word object
Message
From
18/11/1998 10:13:30
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
 
 
To
18/11/1998 09:16:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00158668
Message ID:
00158762
Views:
14
>Mark, thanks for your help, but I can't seem to get this code to work. Any ideas ????
>
>oWord = createobject('Word.Application')
>with oWord
> .WordBasic.AppHide
> .WordBasic.FileOpen(lcFileName)
> .WordBasic.FileSaveAs('c:\test.doc')
> .WritePassword = "derek"
> .WordBasic.FileSaveAs('c:\test.doc')
> .WordBasic.AppShow
>endwith
>
>I also used the line
>
>.WordBasic.WritePassword = "Derek"
>
>and that failed to work.
>
>Do you have an example of using the WritePassword property ?????
>
>regards
>
>Derek

Hi Derek,

The writepassword is a property of the document, not Word, so use

loWord.ActiveDocument.WritePassword = "derek"

This worked for me :-)
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform