![]() |
|
#1
|
|||
|
|||
|
I am a beginner when it comes to VBA. Trying to create a macro that will increase the top margin by 1pt.
I have tried the below. Im not sure how to increase the value of the current margin setting. Any assistance would be greatly appreciated. Thank you. Code:
Sub MarginMove1()
With ActiveDocument.PageSetup
.TopMargin = InchesToPoints("" + 1)
End With
End Sub
|
|
#2
|
||||
|
||||
|
Since the default margin unit of measurement is expressed in points, try:
Code:
Sub MarginMove1() With ActiveDocument.PageSetup .TopMargin = .TopMargin + 1 End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#3
|
|||
|
|||
|
Thank you very much! Works perfect
|
|
| Tags |
| increase margin, vba |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Can I stretch (increase the height of) a letter?
|
eBob.com | PowerPoint | 2 | 10-12-2012 07:31 AM |
| macro Table margin | ubns | Word | 2 | 08-02-2012 04:15 PM |
Increase serial number for every print
|
atomtm | Word | 1 | 06-15-2012 05:39 AM |
| from .doc to .rtf size increase X10 | renato | Word | 1 | 05-15-2012 08:49 AM |
| percentage increase? | dgardner | Excel | 2 | 07-13-2011 03:04 PM |