Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-29-2014, 11:40 AM
thundercats9595 thundercats9595 is offline Createing Macro to Increase Margin by 1pt Windows 7 64bit Createing Macro to Increase Margin by 1pt Office 2010 64bit
Novice
Createing Macro to Increase Margin by 1pt
 
Join Date: Jan 2014
Posts: 7
thundercats9595 is on a distinguished road
Default Createing Macro to Increase Margin by 1pt

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
Reply With Quote
  #2  
Old 01-29-2014, 12:20 PM
macropod's Avatar
macropod macropod is offline Createing Macro to Increase Margin by 1pt Windows 7 32bit Createing Macro to Increase Margin by 1pt Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,373
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 01-29-2014, 12:36 PM
thundercats9595 thundercats9595 is offline Createing Macro to Increase Margin by 1pt Windows 7 64bit Createing Macro to Increase Margin by 1pt Office 2010 64bit
Novice
Createing Macro to Increase Margin by 1pt
 
Join Date: Jan 2014
Posts: 7
thundercats9595 is on a distinguished road
Default

Thank you very much! Works perfect
Reply With Quote
Reply

Tags
increase margin, vba

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Createing Macro to Increase Margin by 1pt 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
Createing Macro to Increase Margin by 1pt 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

Other Forums: Access Forums

All times are GMT -7. The time now is 01:57 PM.


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