Re: VBScript and MS Word

Tech-Archive recommends: Speed Up your PC by fixing your registry



hi davi,

As you may already know, the built-in word constants are not
available to script, unless...

1) You define it yourself:

Const wdWindowStateMaximize = 1

2) Or, you could use a wsf file, and make up a reference the
word typelib:

<reference object="Word.document" version="8.0" />

The advantage of using the typelib is that ALL the built-in
constants will be pre-defined to your script.

note also: you may have to adjust the version number to suit
whatever you have installed.

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)



davimcabral wrote:
Hi guys,

I'm trying to create a VBScript that call the MS Word Aplication,
maximize the window and disable the minimize and restore buttons, but
I'm not getting. Is it possible? I tried the following code to maximize
the MS Word, but it didn't work.



Set app = WScript.CreateObject("Word.Application") app.Visible = True app.WindowState = wdWindowStateMaximize

Other thing, how can I disable hotkeys like Ctrl+O and Ctrl+A in MS
Word? In VBA there is a KeysBoundTo method, but I didn't get to find
nothing about it in VBS.


Thanks, Davi



--
davimcabral
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------
.


Quantcast