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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I align text in a table column using VBA

Status
Not open for further replies.

spruceni

Technical User
May 18, 2007
72
GB
Hi as a newbie I am trying to build a table from a recordset in Access.

So I have the table
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=varNumRec, NumColumns:=5

I have the font
With ActiveDocument.Tables(1).Rows(1).Range.Font
.Name = "Arial"
.Size = 12
.Bold = True
End With

and I have the text in the column ( there are 5 columns)
Selection.Tables(1).Cell(1, 4).Range.Text = "Days Outstanding"

I just can not find the code to center the text in any or all of the columns. I have searched the internet but it seems very difficult to find an answer.

Please help.

 
This forum is for Access, whereas your question is more about Word, try this forum:
VBA Visual Basic for Applications (Microsoft) Forum
forum707
 
Hi
You are right I am trying to build a report in Word from Access using VBA

Regards
 
You need to repost in the suggested forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top