DC1983
asked on
Moving a Table in Word Using VBA
Hi,
Brand new programmer here! I'm currently working on a macro in Excel that will open up an MS Word document and input data from Excel.
Part of the data pull from Excel includes a formatted table. I have figured out how to insert the table into MS Word at the correct place in the document using a bookmark, but unfortunately can't figure out how to get the table to center itself. Any suggestions? My bookmark in MS Word is centered but the table is still inserted left justified. Relevant code section is below.
Thanks!
ActiveSheet.Range(table_ra nge).Selec t
Selection.Copy
With wrdApp
.Selection.Goto What:=wdGoToBookmark, Name:="Chart"
.Selection.Paste
.Visible = True
End With
Brand new programmer here! I'm currently working on a macro in Excel that will open up an MS Word document and input data from Excel.
Part of the data pull from Excel includes a formatted table. I have figured out how to insert the table into MS Word at the correct place in the document using a bookmark, but unfortunately can't figure out how to get the table to center itself. Any suggestions? My bookmark in MS Word is centered but the table is still inserted left justified. Relevant code section is below.
Thanks!
ActiveSheet.Range(table_ra
Selection.Copy
With wrdApp
.Selection.Goto What:=wdGoToBookmark, Name:="Chart"
.Selection.Paste
.Visible = True
End With
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER