Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Automation - Setting Macro Security Level
Message
From
01/08/2003 08:10:40
Fabian Belo
Independent Developer
Argentina
 
 
To
31/07/2003 10:32:34
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00815165
Message ID:
00815811
Views:
11
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform