Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Bug in XP with Margins? (VBA XP)

    I'm wondering if someone can test out something for me. I couldn't figure out why my very simple insert section and apply margins macro wasn't working correctly. I was trying to set the margins as follows:
    Top 1.75, Bottom, 1.25, Left, 1.25, Right 1.25 only it just wasn't working.

    When I decided to try to play around with the margin settings by doing T-4, B-3, L-2, R-1 I discovered that the Top Margin property is actually the Right margin, the Bottom is actually the left and the left is the top and the right is the bottom. So, using my example when I did
    Top = 4
    Bottom = 3
    Left = 2
    Right = 1

    what got set was

    T = 2
    B = 1
    L = 3
    R = 4

    I'm wondering if someone can test this on their machine and see if you get the same results. I did a search on the KB and didn't come up with anything.

  2. #2
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug in XP with Margins? (VBA XP)

    Just s thought: do you can the same results/aberration in porttrait mode as well as landscape? HTh
    Gre

  3. #3
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Bug in XP with Margins? (VBA XP)

    Another quick thought: are you sure when you programatically set the margins for your new section, that they are being applied to the correct section? Manipulating sections via code can be buggy in terms of changes getting applied to a section other than you intend.

    Gary

  4. #4
    New Lounger
    Join Date
    Mar 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug in XP with Margins? (VBA XP)

    Well yes because when I set the margins using "4, 3, 2, 1" those margins got set correctly in the right section. When I use the margins I want and just assume that the top property actually equals the right property then they come out fine as well. Going to try to test this in portrait mode this evening.

  5. #5
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Bug in XP with Margins? (VBA XP)

    I didn't gather from your first post that you were working with a LS section; but that may be 'by design' when trying to assign these properties to landscape sections - Word internally "swaps" margin settings when you switch between portrait and LS (sorry to be unspecific; I just recall having had to do workarounds for these issues, a long time ago...)

    Gary

  6. #6
    New Lounger
    Join Date
    Mar 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug in XP with Margins? (VBA XP)

    Mhmm..that's interesting... a wierd design concept, to be sure. I've been programming with Word for, geez, like 10 years or something and I've never come across this. I'll have to see if I can figure it out for sure or not. Thanks.

  7. #7
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Bug in XP with Margins? (VBA XP)

    Thank you, thank you, thank you <img src=/S/salute.gif border=0 alt=salute width=15 height=20>

    Now I understand why my Watermark macro puts the text in the wrong place on Landscape pages, I had never spent the time to debug this before.

    StuartR

Posting Permissions

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