#1
|
|||
|
|||
Bulk Edit Top Margin in Subfolders
Hi all,
I don't have much experience with VBA so I hope you can help me out as this is a real challenge for me. I have >1000 *.dotx templates in (sub)folders that need to be changed because of a change in my window envelop. The current Top Margin in these templates is 6cm and need to be changed to 5cm. I realy hope this is possible with VBA as a manual change (open, change settings in page setup: top margin: 5cm, apply to: whole document, save and close) for all these individual templates will cost me my whole Christmas Holidays. Any help is much appreciated! |
#2
|
|||
|
|||
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 |
#3
|
|||
|
|||
Hi Greg,
Many thanks for this great solution! This works perfect for me |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change a document to A4 with Left margin 1.5 from Letter size and 1.27 margin | Reuven | Word | 1 | 12-03-2015 04:25 PM |
Email address for subfolders? | judyB | Outlook | 1 | 07-16-2012 03:08 PM |
Accessing Outlook Contacts in Subfolders | jill5545 | Outlook | 1 | 11-17-2010 04:01 PM |
How would I bulk select and copy highlights and then bulk paste them automatically? | copywriterpro | Word | 0 | 04-19-2010 05:21 AM |
Subfolders in Inbox and Sent Items | stevie | Outlook | 0 | 09-08-2009 02:02 AM |