+ Reply to Thread
Results 1 to 3 of 3

Vertical Alignment in Table in Word Copied from Excel

  1. #1
    Registered User
    Join Date
    06-14-2019
    Location
    KG
    MS-Off Ver
    2013
    Posts
    5

    Vertical Alignment in Table in Word Copied from Excel

    Hi everyone!

    I wrote a VBA code, which is to copy multiple tables from Excel and I paste it in Word, using VBA. I did not change any format of the table, but when I use VBA, the vertical alignment is not neat.
    Not neat.PNG
    It appears like it has a 'top' vertical alignment, but when I looked at the Table properties, the vertical alignment is center. Thus, I cannot even manually change the vertical alignment to 'center' again, because it is already 'center', it is just not neat.
    My VBA code is that I chose a certain range of cells to be copied, then I paste in Word.

    However, if I copy the same table from Excel to Word without VBA, it is much more neater with a 'real' center vertical alignment.
    Neat.PNG

    Does anyone know why this is happening? Thank you so much for the help!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Vertical Alignment in Table in Word Copied from Excel

    Welcome to the Forum learnexcelvba!

    There is no way to tell for certain without having your code. However, there are other settings in Word that affect the appearance of the text in table cells.

    In Word, select some text and then check Home | Paragraph | Spacing. You might have space after the paragraph. If so you want it to be 0.

    Select the table and right click on Table Properties. Check row height.

    If checking these settings does not help then attach your Excel file. If you have private data in the file then at least paste all of your code into a post, using [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE].

    The paper clip icon does not work for attachments. To attach a file, under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    06-14-2019
    Location
    KG
    MS-Off Ver
    2013
    Posts
    5

    Re: Vertical Alignment in Table in Word Copied from Excel

    Thank you for your reply 6StringJazzer!

    Your solution is absolutely right, I removed the spacing after the paragraph and it works perfectly fine. Thank you once again for your help and informations related to this forum!

+ 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] Copied excel table to Word, but need Word opening in landscape
    By jennis7242 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 05-17-2018, 08:58 AM
  2. Importing Word table into Excel Worksheet keeping same alignment of text
    By Advancedexcel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-30-2014, 02:49 AM
  3. Replies: 0
    Last Post: 01-25-2013, 07:03 AM
  4. Excel to Word alignment
    By Hikertrash in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-04-2012, 08:14 PM
  5. Replies: 7
    Last Post: 04-21-2009, 02:50 AM
  6. Replies: 1
    Last Post: 04-03-2006, 09:15 AM
  7. [SOLVED] details about vertical alignment in Excel cells
    By clairdelune in forum Excel General
    Replies: 2
    Last Post: 01-28-2005, 08: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