There are various methods within the WordApp object.  You
can look at reportgen.ebs script located in Rose home directory
for some examples, or look for VB programs that access Word
out on the web for examples.

Here's are notes on suggestions to get more info on the subject:

*************************************************************************
A complete list of features is also Wrdbasic.hlp. Here you find also
arguments and descriptions of the Word commands. But this file is not
installed during a typical Word installation.

You can find it on your Word/Office CD in the WinWord directory or you run
setup again and choose customized install and select the options Word,
Online help, Word Basic.
*************************************************************************
One thing you can do is bring up the Visual Basic Editor from within Word
via "Tools | Macro | Visual Basic Editor (alt-F11)".  Then view the object
browser via "View | Object Browser (F2)".  If you just pick "Word" in the
upper left drop-down list, you'll see the Word classes on the left, if you
click one you'll see its methods and properties on the right.  If you click
a method or property on the right you'll see the detail (types and
parameters) at the bottom.

For example, from examining this window I found that the Application class
has a method named Run that has this signature:
Sub Run(MacroName As String)
So in your code below you should be able to do:
WordApp.Run "macrox"
*************************************************************************
If you're looking for overall Word programming reference info, go into the
Word VBA editor, choose the "Help" menu, and then the "Contents and Index"
menu item.  If Office is installed "properly", you should see among the
various help topics "Microsoft Word Visual Basic Reference", along with
similar entries for the other Office tools.

As to programming guides, I suggest Microsoft's "Office 97 Visual Basic
Programmer's Guide" (which may also be available online at MSDN, or on
something like the MSDN CD by now).  "Word 97 Annoyances" by Woody Leonhard
(www.wopr.com) et al also contains a few tips for dealing with some quirks
in the Word VBA object model, but programming is not the focus of the book.
 Unfortunatlely, the WOPR folks say it may be years before they're able to
come up with the Word VBA equivalent to their wonderful, but WordBasic
oriented, "Hacker's Guide to Word for Windows, 2nd Ed."  (which is still
relevant since many of the internal behaviors are still there regardless of
whether you get there via WordBasic or VBA).
*************************************************************************
A complete list of features is in Wrdbasic.hlp. Here you find also
arguments and descriptions of the Word commands. But this file is not
installed during a typical Word installation.

You can find it on your Word/Office CD in the WinWord directory or you run
setup again and choose customized install and select the options Word,
Online help, Word Basic.

Another place to get a definitive list of the Word objects is to use the
ObjectBrowser capability in Excel or Word. You can set a reference to the
Word Object Library and then view all of the possible methods and
attributes of the VBA/OLE objects supported.
*************************************************************************
To get information on exposed objects within Word, just make a reference to
the Microsoft Word XX Object Library.  I believe the latest is Microsoft Word
8.0 Object Library.  You can do this within Visual Basic > Project >
References, find the MS Word Object Library, go to View > Object Browser, and
finally select the Word library.

Another cool trick is to use macros.  By recording a macro, you can perform
operations within Word (for example, inserting a picture), stop the macro, and
then examine the contents of the macro.  The following is a small example of
what happens when a date is inserted, text written, changing the font size,
and clip art is inserted into a blank Word document:

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 03/01/00 by abentley
'
 Selection.InsertDateTime DateTimeFormat:="MMMM d, yyyy", InsertAsField:= _
     False

 Selection.TypeParagraph
 Selection.TypeParagraph
 Selection.TypeText Text:="This is a running macro..."
 Selection.TypeParagraph
 Selection.TypeParagraph
 Selection.TypeText Text:="Changing the font"
 Selection.Font.Size = 14
 Selection.TypeText Text:=" Changing the font size"
 ActiveDocument.Shapes.AddOLEObject Anchor:=Selection.Range, ClassType:= _
     "MSGraph.Chart.8", LinkToFile:=False, DisplayAsIcon:=False
nd Sub

This may help identify object properties and methods within Word that you can
 utilize through REI scripting.  In order to do set up a macro within Word, go
to "Tools > Macros > Record New Macro" and start performing operations with
Word that you are looking for.  Stop the macro recording (there should be a
floating toolbar with play/stop) and then go to "Tools > Macro > Macros",
select the Macro, and step into it.  It should bring up a VB debugger to
examine its contents.  Hope that helps.
*************************************************************************
For pure reference as to what messages you can send and properties you
can use, in the Help for Word there is a volume called Microsoft Word
Visual Basic Reference. In there are lists of Events, Methods, Objects,
and Properties. There is also a section named Automating Common Word
Tasks which might get you familiar with how things are done. Although it
is aimed towards VB, the only difference I have found is in that while
VB uses literals for constants (for example, black is wdBlack) Rose's
scripting Basic uses integers which frequently means discovery of the
correct value by trail and error.
************************************************************************

Patrick Kennedy
 Rational Support

On Jan 25, 11:58, [EMAIL PROTECTED] wrote:
> Subject: (ROSE) Problem with Exporting Rose model to Word
>
>
> Hi experts,
>
> We are in the process of developing a Rose script which copies the
> different items in an Activity diagram and its descriptions and put
> them in a Word document. I would like to know how we can know the
> different methods available to manipulate the Word file to suit our
> needs, after the Word object is created. So please let me know the way
> to get the list of functions available in Word which are available to
> rose scripts.
>
> Thanks in advance
>
> Rajesh RV
> Architect
> IBS Software Services
> Technopark
> Nila Trivandrum
>
>
> ************************************************************************
> * Rose Forum is a public venue for ideas and discussions.
> * For technical support, visit http://www.rational.com/support
> *
> * Admin.Subscription Requests: [EMAIL PROTECTED]
> * Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
> * Other Requests: [EMAIL PROTECTED]
> *
> * To unsubscribe from the list, please send email
> *
> * To: [EMAIL PROTECTED]
> * Subject:<BLANK>
> * Body: unsubscribe rose_forum
> *
> *************************************************************************
>
>-- End of excerpt from [EMAIL PROTECTED]


************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages: 
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************

Reply via email to