+ Reply to Thread
Results 1 to 2 of 2

Autofit Table width in Outlook

  1. #1
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Autofit Table width in Outlook

    Hello,
    I would like to have a code for automatic autofit table when pasting from excel to message body.

    I have tried this one but fot an error for the 2nd line saying: "Object Required"

    Private Sub AutoFitContentsForAllTables()
    If ActiveDocument.Tables.Count > 0 Then
    Dim objTable As Object

    Application.Browser.Target = wdBrowseTable
    For Each objTable In ActiveDocument.Tables
    objTable.AutoFitBehavior (wdAutoFitContent)
    Next
    End If
    End Sub



    Thank for your help.

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Autofit Table width in Outlook

    Anyone would know the code for that?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] AutoFit Height ONLY not width
    By DHFE in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-30-2015, 11:02 AM
  2. [SOLVED] Autofit Column Width
    By plans in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-06-2015, 01:45 PM
  3. Pivot table autofit column width and formatting to print in landscape
    By pdalal in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-20-2014, 03:46 PM
  4. [SOLVED] autofit multiple columns and a little more width
    By Hein in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-09-2013, 04:25 PM
  5. Quick Question on Column Width Autofit
    By dellphinus in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-04-2010, 04:19 PM
  6. autofit cells in column width
    By Boethius1 in forum Excel General
    Replies: 5
    Last Post: 04-11-2006, 09:55 PM
  7. [SOLVED] autofit Column width- Ajit
    By Ajit Munj in forum Excel General
    Replies: 3
    Last Post: 02-24-2005, 02:06 PM

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