+ Reply to Thread
Results 1 to 3 of 3

Macro to Autofit a table in Word from Excel

  1. #1
    Registered User
    Join Date
    06-05-2009
    Location
    Kalamazoo, MI
    MS-Off Ver
    Excel 2007
    Posts
    2

    Macro to Autofit a table in Word from Excel

    Hello all,

    I'm using a macro to copy a whole bunch of tables from Excel 2007 to Word and can't figure out how to autofit the tables to the page size once in word. The word vba command is selection.AutoFitBehavior (wdAutoFitWindow) but, I can't seem to use that command from excel. Any ideas?

  2. #2
    Forum Contributor
    Join Date
    12-11-2004
    MS-Off Ver
    2007
    Posts
    137

    Re: Macro to Autofit a table in Word from Excel

    Hi,

    Rather than Selection property, try to specify the table (index or name) in your code :

    Please Login or Register  to view this content.

    Regards,
    michel

  3. #3
    Registered User
    Join Date
    06-05-2009
    Location
    Kalamazoo, MI
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Macro to Autofit a table in Word from Excel

    Yeah, that's got me on the right track. Thanks, Michael!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1