D
damezumari
I use vb6, win2000, and word2003.
I am creating a word document in vb.
After I write the data to the document I put it into a table:
oRange.start = WordDoc.Range.start
oRange.ConvertToTable numcolumns:=IIf(choice, 4, 1), AutoFit:=True
I want to have the second column right-aligned. This code does not
work:
tbl.Columns(2).Select
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
It works as a macro in Word on the final document, but not from vb.
This code works, but is slow:
Dim cl As Cell
For Each cl In tbl.Columns(2).Cells
cl.Range.ParagraphFormat.Alignment = wdAlignParagraphRight
Next cl
Regards,
Jan Nordgreen
I am creating a word document in vb.
After I write the data to the document I put it into a table:
oRange.start = WordDoc.Range.start
oRange.ConvertToTable numcolumns:=IIf(choice, 4, 1), AutoFit:=True
I want to have the second column right-aligned. This code does not
work:
tbl.Columns(2).Select
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
It works as a macro in Word on the final document, but not from vb.
This code works, but is slow:
Dim cl As Cell
For Each cl In tbl.Columns(2).Cells
cl.Range.ParagraphFormat.Alignment = wdAlignParagraphRight
Next cl
Regards,
Jan Nordgreen