Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Automation - Setting Macro Security Level
Message
De
01/08/2003 08:10:40
Fabian Belo
Independent Developer
Argentine
 
 
À
31/07/2003 10:32:34
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00815165
Message ID:
00815811
Vues:
13
>>Dear all;
>>
>>After the usual: oword=createobject("Word.application")
>>Is there any way (method) to set this value? (Tools-Macro-Security)
>>
>>Any hints and/or links will be greatly appreciated.
>>Thank you,
>
>I've never tried this, but I sure hope it can't be done by automation. That would defeat the whole purpose of the setting.
>
>Tamar

Using "Sendkeys" as Yuri suggested=setting defeated :)
This changes the security level from high to medium and works fine on MS-Word XP, the sendkeys order/code may vary in other versions.
Local oWord
oWord=Createobject("Word.Application")
oWord.WindowState=0
oWord.Application.Visible = .T.
oWord.Application.Activate
oWord.Wordbasic.Sendkeys("%(tms){TAB}{DOWN}{ENTER}")
oWord=.Null.
"Since I've read that alcohol is bad... I quit reading."
Me


http://www.fabianbelo.com.ar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform