Consulting

Results 1 to 3 of 3

Thread: How to control winword & table by Excel VBA ?

  1. #1
    VBAX Regular
    Joined
    Feb 2017
    Location
    Hong Kong
    Posts
    33
    Location

    How to control winword & table by Excel VBA ?

    I use Excel VBA to output a report as winword format, how can I put the font at table cells alignment in centre by Excel VBA code ?

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    Paragraph alignments in Word are managed via the .ParagraphFormat.Alignment property. For example:
    wdDoc.Tables(1).Range.ParagraphFormat.Alignment = wdAlignParagraphCenter
    or, for late binding:
    wdDoc.Tables(1).Range.ParagraphFormat.Alignment = 1
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    It seems you've asked about this sort of thing before: http://www.vbaexpress.com/forum/show...-at-word-table
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Posting Permissions

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