Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Aug 2006
    Location
    Gtr London, England
    Posts
    256
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Vertical Alignment (VBA word 2003)

    Hi,

    Im just tweaking a macro that runs a mail merge into labels. I need the data to be moved to the top of the label so there is maximum room at the bottom margin. Ive got the following from recording a macro but this will only amend one cell.

    Selection.Range.Cells(1).VerticalAlignment = wdCellAlignVerticalTop

    Im unable to re-write it to run on the 'wholestory' ie all labels, despite playing around with various bits of code.

    I suspect it may have to go into a loop which is unfortunately slightly beyond my capabilities at the mo.

    Any ideas anyone?

    Cheers.
    Lee

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Vertical Alignment (VBA word 2003)

    There is no need to loop. You can use this:

    ActiveDocument.Tables(1).Range.Cells.VerticalAlign ment =wdCellAlignVerticalTop

  3. #3
    3 Star Lounger
    Join Date
    Aug 2006
    Location
    Gtr London, England
    Posts
    256
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Vertical Alignment (VBA word 2003)

    Thanks for that Hans......Works a treat.

    Im getting some good experience out of this little project. <img src=/S/clever.gif border=0 alt=clever width=15 height=15>

    Best Regards
    Lee

Posting Permissions

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