You can try 2 Wonderware script functions startapp to open word and a specific doc then have wwexecute call a macro in word that goes to a specific bookmark.
No, and I don't know how you would. Perhaps a VBA macro in word might do it. You might try converting the file to HTML and opening it with a browser from InTouch. Most HTML books cover how to do this.
Create a button with an action link using the "Startapp" command. See your Help files for detailed description.
It would be something like;
Startapp "path1/winword.exe path2/filename.doc";
Note that the 'path1/' part must be the path to winword and 'path2/' must be the path to the file.
The path must not have any spaces in it as Winword doesn't seem to like this.
This will get Winword running with your file open (if your file exists). If it doesn't exist, it will at least get winword open. As for getting to a bookmark in the file, you're on your own.
Be careful to password protect this link as it is very easy for a reasonably smart guy to get to the internet through winword. This would open your system to all sorts of porn (and/or viruses if you have no firewall but have ADSL or cable
connection to the internet).
Try to use
(From InTouch)
*WWStartApp to launch winword
*WWExecute to launch your Word Macro
(From Word)
*A Macro
You should make a tag which hold your bookmark value. This tag can you put in in a cell in the document. This cell read the value of your tag = the macro can read it.
The macro is moving you around in the document based on your bookmark value given from InTouch.
> You can try 2 Wonderware script functions startapp to open word and a specific doc
> then have wwexecute call a macro in word that goes to a specific bookmark.
Thanks for all the answers. Here is how far I've come (still not able to run the macro in word, but I'm close to it):
This is a script that runs the macro "Makrotest" in Excel (Macro and Command are defined as MemoryMessagetag, Excel is already running in the background with the sheet "DDE_Test"):
This doesn't work! I get the errormessage "Compile error: Sub or Function not
defined" in VB, and the macro "TmpDDE" were tried started (although I have made a macro in Word called "Bookmark" and run OK in Word).
Try Creating a macro that runs when you open the WORD document. Example (The name of the bookmark is "scope")::
Sub AutoOpen()
'
' Autpen Macro
' Macro created 6/7/02
'
Selection.GoTo What:=wdGoToBookmark, Name:="Scope"
With ActiveDocument.Bookmarks
.DefaultSorting = wdSortByName
.ShowHidden = False
End With
End Sub