Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-22-2016, 05:23 AM
fermeul fermeul is offline Bulk Edit Top Margin in Subfolders Windows 10 Bulk Edit Top Margin in Subfolders Office 2013
Novice
Bulk Edit Top Margin in Subfolders
 
Join Date: Dec 2016
Posts: 2
fermeul is on a distinguished road
Question 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!
Reply With Quote
  #2  
Old 12-22-2016, 07:28 AM
gmaxey gmaxey is offline Bulk Edit Top Margin in Subfolders Windows 7 32bit Bulk Edit Top Margin in Subfolders Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,428
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

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
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #3  
Old 12-23-2016, 02:25 AM
fermeul fermeul is offline Bulk Edit Top Margin in Subfolders Windows 10 Bulk Edit Top Margin in Subfolders Office 2013
Novice
Bulk Edit Top Margin in Subfolders
 
Join Date: Dec 2016
Posts: 2
fermeul is on a distinguished road
Default

Hi Greg,

Many thanks for this great solution!
This works perfect for me
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bulk Edit Top Margin in Subfolders 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
Bulk Edit Top Margin in Subfolders 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

Other Forums: Access Forums

All times are GMT -7. The time now is 09:19 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft