Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Tue, 3 Jun 2008 03:31:00 -0700,    group: microsoft.public.word.vba.beginners        back       


How add new table using VBA   
I have a problem with new table:

ActiveDocument.Tables.Add range:=mysec.range, NumRows:=2, NumColumns:=2
mysec.range.InsertBefore Chr(13) & Chr(10) & "text 1"

But the "text 1" is disappearing or is in a cell (1,1) of the table.
How can I add the text before the table??
Also Do You know how put the new line to the text? Now I'm trying to put 
codes in ASCII 13 and 10.
date: Tue, 3 Jun 2008 03:31:00 -0700   author:   Rafal K. Rafal

Re: How add new table using VBA   
"Rafal K." <Rafal K.@discussions.microsoft.com> wrote in message 
news:212C02C4-BD3D-49ED-8F36-DD56679A3A19@microsoft.com...
>I have a problem with new table:
>
> ActiveDocument.Tables.Add range:=mysec.range, NumRows:=2, NumColumns:=2
> mysec.range.InsertBefore Chr(13) & Chr(10) & "text 1"
>
> But the "text 1" is disappearing or is in a cell (1,1) of the table.
> How can I add the text before the table??

Add the text first, and insert the table after

> Also Do You know how put the new line to the text? Now I'm trying to put
> codes in ASCII 13 and 10.

Use the InsertParagraphAfter method


-- 
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
date: Tue, 3 Jun 2008 11:50:45 +0100   author:   Jonathan West

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us