Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word object
Message
De
18/11/1998 10:13:30
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, Royaume Uni
 
 
À
18/11/1998 09:16:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00158668
Message ID:
00158762
Vues:
15
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform