+ Reply to Thread
Results 1 to 6 of 6

How to align Html table on left side

  1. #1
    Forum Contributor
    Join Date
    01-06-2017
    Location
    india
    MS-Off Ver
    2010
    Posts
    118

    How to align Html table on left side

    HI,



    When I Run the automail code i get the output like below (excel table align in Center) . Suggest me How to align "HTML Excel table " to the Left side.


    image.jpg



    regards
    shiva
    Attached Files Attached Files
    Last edited by shiva_raj; 12-31-2018 at 12:36 AM. Reason: inserted image

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to align Html table on left side

    I've not studied the code in detail yet but where is the cursor when the macro is run?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: How to align Html table on left side

    As you are using the publishobject I think you need to change the alignment of the used range first

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Contributor
    Join Date
    01-06-2017
    Location
    india
    MS-Off Ver
    2010
    Posts
    118

    Re: How to align Html table on left side

    HI Andy,


    Thank you for reply. I want to align entire table "to the left".

  5. #5
    Forum Contributor
    Join Date
    01-06-2017
    Location
    india
    MS-Off Ver
    2010
    Posts
    118

    Re: How to align Html table on left side

    HI Richard, thank you for reply. Code is running properly. But in the final output (as in image) excel table comes in the middle. I want to align that entire excel table to the "Left side" only. help me.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: How to align Html table on left side

    In that case you will need to add some HTML around the sText variable in order to left align content.

    & "< html > < body >< div align=""left"" >" & stext & "< /div >< /body >< /html >" _
    & vbNewLine & vbNewLine _

+ 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. VBA excel to word insert footer (Text - Left align) & (Page number - Right align)
    By Richavlaues in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2017, 06:22 PM
  2. Replies: 0
    Last Post: 08-10-2016, 12:34 PM
  3. Align data in multiple sheets in a mastersheet side by side
    By sujit_sarkar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2015, 02:40 AM
  4. [SOLVED] How can I change Chart.Axes(xlValue) from left side to right side ?
    By HerryMarkowitz in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 09-15-2014, 02:18 PM
  5. [SOLVED] Text align cells in table being created in HTML outlook mail item
    By askpcguy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-12-2014, 05:26 PM
  6. [SOLVED] How to shift numeric number from left side to right side of a particular word
    By nur2544 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-13-2013, 09:05 AM
  7. [?] Align Identical Values side by side with a Macro
    By cadew in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-17-2012, 03:37 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