Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display vertical text in a word table

Status
Not open for further replies.

nwb1

Programmer
Apr 28, 2004
39
GB
Can any one tell me how to change the direction of the text (Text direction using table) in a word table using vb please?
The reason for this been I have 25 colums/20 rows in one table and that will not fit into one page of a word document. Is there a way to "Auto fill" the table so that all rows/cols are visible ?

I'm using following coding to create a table in word.

Thanks in advance

Dim wrdDoc As Word.Document
Dim wrdSelection As Word.Selection
Dim wrdApp As Word.Application
Set wrdApp = New Word.Application
wrdApp.Visible = True

Set wrdDoc = wrdApp.Documents.Add
wrdDoc.Select
Set wrdSelection = wrdApp.Selection

wrdDoc.Tables.Add wrdSelection.Range, NumRows:=2, NumColumns:=5
With wrdDoc.Tables(1)
.AutoFormat Format:=wdTableFormatGrid8
.Cell(1, 1).Range.InsertAfter "col-1"
.Rows(1).Shading.Texture = wdTextureVertical
.Cell(1, 2).Range.InsertAfter "col-2"
.Cell(1, 3).Range.InsertAfter "col-3"
.Cell(1, 4).Range.InsertAfter "col-4"
.Cell(1, 5).Range.InsertAfter "col-5"
End With
 
Have you tried doing the operation in word?. You can often get nearer to finding how to do things if you can do it in word, and running a macro. Look at the resultant macro.
 
Thanks for your comments but I just found a method to do that.

wrdApp.Selection.Orientation = wdTextOrientationDownward
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top