|
-
Jul 11th, 2006, 02:41 AM
#1
Thread Starter
New Member
Write Word Table in Visual Basic
Hi
I am writing to a Word document from Visual Basic
It tried this code:
Set wrd = Word.Documents.Open("C:\test.doc")
Selection.InsertAfter Text:="Table to come"
Selection.Font.Bold = True
wrd.Tables.Add Range:=Selection.Range, NumRows:=3, NumColumns:=2, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:=wdAutoFitFixed
wrd.Tables(1).Rows(1).Select
wrd.Tables(1).Cell(1, 2).Select
wrd.Save
The codes works but table is overwriting the text
How can i say
"Table to come" and then table?
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|