GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Edit a Word doc with VBScript?


I'm posting this here because it's really not a request for support.

I'm not a developer, but I'm a MS Word "power user," I guess. A long time ago I managed to put together a VBA-enabled Word doc for doing psych reports for work. My master template has all my canned verbiage, which I manually cull later. It has "[n]" everywhere the person's name should go. There are similar codes for pronouns he/she, etc. When you first open the doc, a dialog pops up and prompts for the name etc. (see img). The VBA code goes through the document doing all of the find-and-replaces, then renames the doc and saves it in a particular folder that is determined by the choice of the Building radio group.

So anyway... I was watching one of the "What's New" Opus 12 videos and noticed that there is a GUI building tool in the script editor. I know that VBS can probably access Word as an object, so then I was curious if Opus could actually edit a Word doc in the same way that my tool does.

Again, I'm happy with my current VBA setup, I was just curious if the same thing could be accomplished from right inside of Opus. -thoughts?


You probably can do that, yeah. The Word objects are available within other programs. This script uses them from Opus: Column: Word Count for Microsoft Word documents