Word Object 
Author Message
 Word Object

Hi,

I am not sure about your question but you could:

1. Record a macro in word (provided that you use word 2000 or later, I
think)
2. Create a Word OLE application.
3. With that use the code from the macro

Something like

       Set WordApp = CreateObject("Word.Application.9")
       With WordApp
           .Selection.TypeText Text:="asas"
           .Selection.TypeParagraph
           .Selection.TypeParagraph
           .Selection.TypeText Text:="asas"
           .Selection.TypeParagraph
           .Selection.TypeParagraph
           .Selection.MoveUp Unit:=wdLine, Count:=2
           .Selection.MoveRight Unit:=wdCharacter, Count:=5,
Extend:=wdExtend
           .Selection.Font.Bold = wdToggle
           .Selection.MoveUp Unit:=wdLine, Count:=2
           .Selection.MoveRight Unit:=wdCharacter, Count:=4,
Extend:=wdExtend
           .Selection.Font.Italic = wdToggle
       End With

Hope this helps.

Anne.


Hello everyone. I'm trying to create a COM component which utilizes the Word
Object Model to create a Word Document dynamically. It's hard to find info
on the
Word Object model and how to use it. Right now, I'm working on formatting
specific lines of text, such as bolding and italics and whatnot. Anyone know
how
I can do this? Thanks for any help...



Thu, 04 Dec 2003 21:23:48 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. insert word object based on a word template?

2. Query on a Word document using the Word object

3. Word objects from Acces via VB6 to WORD document

4. Using Word Template With Word Objects

5. Window flash from Word Object vb5, word 8

6. find/replace in a Word Doc using word object and vbscript

7. How to set word object from Handle of word.applicaton

8. How to set word object from Handle of word.applicaton

9. Access 97: How do I edit an embedded Word object through automation

10. Getting a handle to a MS-Word object

11. Word object model hWnd

12. can't declare word object variable

 

 
Powered by phpBB® Forum Software