Link to home
Start Free TrialLog in
Avatar of DC1983
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_range).Select
Selection.Copy

With wrdApp
    .Selection.Goto What:=wdGoToBookmark, Name:="Chart"
    .Selection.Paste
    .Visible = True
End With
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DC1983
DC1983

ASKER

Code works! Thanks for your heilp