See:
http://gregmaxey.com/word_tip_pages/...der_addin.html Your user defined procedure would be:
Code:
Function ChangeTopMargin(ByRef oDoc As Word.Document) As Boolean
On Error GoTo Err_Handler
oDoc.PageSetup.TopMargin = CentimetersToPoints(6)
ChangeTopMargin = True
lbl_Exit:
Exit Function
Err_Handler:
ChangeTopMargin = False
Resume lbl_Exit
End Function