Hi Janelle,

first, thanks for the kind words.

next, there are some beginning scripting articles in the GW wiki you should
have a look at:

http://gwmicro.com/wiki

I'm trying to add to them as time allows, so please do come here and say
what parts are leaving you confused or giving you trouble.  If I don't add
to the articles, then maybe someone else will; I have been asking others to
contribute to them.

finally, I admit I just copied those key definitions out of the
documentation for the VBA environment, but I didn't test them.  I'll do so
and get back to you, but maybe they don't work after all.  I'll let you
know.

glad it's helping.

Chip
 

-----Original Message-----
From: Janelle Edwards [mailto:jedwards9...@sbcglobal.net] 
Sent: Tuesday, March 16, 2010 12:07 AM
To: gw-scripting@gwmicro.com
Subject: RE: announcing release of MS Office 2.0 - allowing another platform
for developing VBScript

Chip:

I wanted to take a moment to say thanks for the MS Office script. It is
wonderful! As someone who worked in programming before being downsized three
times, I can generally learn computer concepts by reading the manual.
Scripting has not come easily for me though.
Everything I have read has seemed either like I missed an introductory book
or it did not relate well to Window-Eyes. Of course, I have picked up some
concepts from various sources but I have felt like I was missing the
elementary concepts and did not even know the questions to ask. Your script
is helping me find those answers. 
The script is generally working well for me except two commands. Perhaps I
just do not understand their intent <smile>.

SHIFT+F4: Find Next: repeat text search down through your code. If no text
search has been done, the Find  dialog box is displayed.
SHIFT+F3: Find Previous: repeat text search up through your code. If no 
SHIFT+text search has been done, the Find  dialog box is
displayed. 

Nothing seems to happen when I press these key combinations. I can perform a
find using the Control F with lots of options and flexibility so this is not
a problem.

Thanks again for the great script.

Janelle
-----Original Message-----
From: Chip Orange [mailto:lists3...@comcast.net]
Sent: Saturday, March 13, 2010 8:40 PM
To: gw-scripting@gwmicro.com
Subject: announcing release of MS Office 2.0 - allowing another platform for
developing VBScript

Hi all,

I've just released MS Office 2.0, which should be considered beta.  Below is
a short bit of documentation on what it does.  I've been using it for
VBScript development for awhile, and I think it works great, but I know it
needs vastly improved documentation for those not familiar with the Word VBA
IDE.

I would appreciate others using it, and telling me where they had
difficulties, or can see opportunities for improvement.


Chip

-------

What the MS Office Script Does:

The MS Office script allows you to make use of the IntelliSense feature in
the VBA development environment of MS Office components.  

In addition, because VBA and VBScript are nearly identical languages, and
because  IntelliSense makes development so much easier, in fact, the entire
VBA environment makes development so much easier, the MS Office script now
allows you to  convert and import your VBScript script files into VBA
modules, which then allows you to perform your development work in the VBA
environment.  

When you're done, and ready to run the script, you can use the "save as VBS"
option which will convert the VBA module, and export it, back into a
VBScript .vbs  file.



What are the Advantages for Developing VBScripts using this Method?

* Use of IntelliSense
* The WindowEyes object model is integrated into the environment so that all
root-level objects function with IntelliSense (including the Script object)
* Any third-party object can easily be integrated into the environment for
use with IntelliSense
* Variables, functions, and parameters can be given object types, which
allow them to function with IntelliSense
* Instant notification of syntax errors when you enter each command line
* Ability to have your entire script checked for errors by use of the VBA
"compile" feature
* An object browser, which allows you to see the structure of any object
model (especially convenient for use with third-party objects)
* Context sensitive help for each VB command or function
* Search and/or replace functionality, which can be limited to just the
current procedure or function
* Ability to move through your script from procedure to procedure, to jump
to the top of the current procedure, and to go to the procedure declaration
for the procedure currently under the cursor
* Where you've declared variables or parameters of a type which can be
enumerated, when entering a command, the editor will automatically popup a
listbox with the correct types of enumerations (similar to use of
IntelliSense) when it's the proper point in the command for this type
* When saving as VBS, all VBA features such as variable types are removed
automatically


What Features (if any) Do Not Work With This Environment?

Unfortunately, Class definitions can be problematic in a VBA program; you
cannot use the "compile" feature, to do syntax and error checking, if you
have any class definitions in your script.


How Do I Use the MS Office Script to Edit My VBScript Files?

The basic idea is:

* press the alt-control-C hotkey, and you are prompted for a VBScript file
to convert and import into the VBA environment.  MS Word is started, and you
are left in the VBA editing window.
* perform your development (this won't hardly take any time at all!), and
press control-S to save your work in progress
* Press the alt-control-E hotkey any time you wish to edit one of your
converted VBA modules.  You will be prompted for which one is to be edited,
and the script will start MS Word, and leave you in the VBA editing window
for that module.
* When you're ready to run the script, press the alt-control-S hotkey to
save it as a .vbs file.  You must be in the VBA editing window for the
module being saved when you do this.  You will be prompted for the name of
the .vbs file.

Note that The VBA modules are saved in a Word template, and the document
portion of this template is always displayed whenever the template is in
use; in this document is a summary of the command keys useful in the VBA
environment.


Setting up MS Word:

You must do this step once, before this script can work with MS Word.
For any Automation client to be able to access the VBA object model
programmatically, the user running the code must explicitly grant access. To
turn on access, the user must follow these steps.

Word 2003 and Word XP:
1. Open the Word 2003 or Word XP application . 
On the Tools menu, click Macro, and then click Security to open the Macro
Security dialog box.
2. On the Trusted Sources tab, click to select the Trust access to Visual
Basic Project  check box to turn on access.
3. Click OK  to apply the setting.
4.  Close Word.

Word 2007:

1. Open Word. 
Click the Microsoft Office button, and then click Application Options.
2. Click the Trust Center tab, and then click Trust Center Settings.
3. Click the Macro Settings tab, click to select the Trust access to the VBA
project object model  check box, and then click OK.
4. Click OK.
5. Close Word.



Under the Hood:

If you're familiar with the Office VBA environment, you may want to know how
this script has set things up.  It keeps all your VBScript scripts, which
have been converted into VBA, in a single project (named WE_App) in a
template file named we.dot, and which is located in the WindowEyes user
profile dir with the scripts.  This project keeps each converted script in a
standard module; in addition, there is one standard module named WEApp,
which the script uses for declarations which help integrate the WindowEyes
object model into the development environment.
The script has the WindowEyes object model, as well as others such as the
script runtime object, listed as object references for the project.

Reply via email to