So, I’m having problems with a script to change the margins to .15 in a document in the Post Open event.
Here’s the code:
keybd_event 46,0,0,0 ' . key down
keybd_event 46,0,2,0 ' . key up
keybd_event Asc("1"),0,0,0 ' 1 key down
keybd_event Asc("1"),0,2,0 ' 1 key up
keybd_event Asc("5"),0,0,0 ' 5 key down
keybd_event Asc("5"),0,2,0 ' 5 key up
and I tried:
keybd_event Asc("."),0,0,0 ' . key down
keybd_event Asc("."),0,2,0 ' . key up
keybd_event Asc("1"),0,0,0 ' 1 key down
keybd_event Asc("1"),0,2,0 ' 1 key up
keybd_event Asc("5"),0,0,0 ' 5 key down
keybd_event Asc("5"),0,2,0 ' 5 key up
But it always sets the margin at 11.69.
It works fine if I set the margin to a whole number - like 0 or 1 but it has a hard time with the decimals.
Any ideas?