in reply to Issues in Setting Word margins using Win32::OLE

A slightly cleaner method would be to change the larger existing margin to the new value first. While I haven't seen the module code adding a sort on the existing margins during the hash traversal sounds possible.
  • Comment on Re: Issues in Setting Word margins using Win32::OLE

Replies are listed 'Best First'.
Re^2: Issues in Setting Word margins using Win32::OLE
by shantanu_bhadoria (Novice) on May 28, 2008 at 12:41 UTC
    Here is the funny twist with that solution. I am also setting papersize before i set margins and word allows the paper size to be set to invalid values. e.g. at initial margins of 7,2 initial paper size being 10 by 10 if i set the papersize to say 8 by 8 the word app would allow it. and then we are totally stuck cuz the app wouldn't hear of allowing either right or left margin to be set alone. the funny thing is it allows the VBA to set the margins but only if it is within a with and if both the margin value together make a valid pair.