Solved

Macro to AutoFit to Window all tables in a document

Posted on 2007-11-15
3
4,388 Views
Last Modified: 2013-11-27
Hi Macro experts.
Can you help me to AutoFit to Window all the tables in a single word document.

If I use the select all text option then try to use the AutoFit to Window, I can't as the option is not available for some reason.  

I hope a macro could acheive this. Please help with code.  
 
0
Comment
Question by:Phesant123
  • 2
3 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
Comment Utility
No problem with a macro

Sub AutoFitToWind()
    Dim tbl As Table
    For Each tbl In ActiveDocument.Tables
        tbl.AutoFitBehavior wdAutoFitWindow
    Next tbl
End Sub


0
 
LVL 1

Author Comment

by:Phesant123
Comment Utility
Cheers Graham i'll try this on Monday and confirm solution if macro is succesful.
0
 
LVL 1

Author Closing Comment

by:Phesant123
Comment Utility
Great help,fast and to the point.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now