Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-17-2014, 12:10 AM
ireeve ireeve is offline Left Margin error Windows 7 32bit Left Margin error Office 2007
Novice
Left Margin error
 
Join Date: Mar 2011
Posts: 5
ireeve is on a distinguished road
Default Left Margin error

When I try to use VBA to change left margin in Word I get an error, if I simply drag from the ruler - no problem.
But I want to use something like
ActiveDocument.Sections(28).PageSetup.LeftMargin = 72

Run time error 5518
Increasing left margin causes first column to become too narrow some....

I have only one column

Help please



Update 1:
There are many sections in the document, I am only concerened in this example with section 28.
Its A4 Portrait Right margin normal.
The error message is the 5518 above.

Last edited by ireeve; 10-17-2014 at 06:16 AM. Reason: update
Reply With Quote
  #2  
Old 10-17-2014, 05:31 AM
macropod's Avatar
macropod macropod is offline Left Margin error Windows 7 64bit Left Margin error Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

What error do you get? What is the page size, orientation & right margin size? Does the document actually have 28 Sections?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 10-17-2014, 05:35 AM
gmaxey gmaxey is offline Left Margin error Windows 7 32bit Left Margin error Office 2010 (Version 14.0)
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

This issue must in some way be related to your current page layout in that section as

ActiveDocument.Sections(1).PageSetup.LeftMargin = 72

runs without issue in a new blank document
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Left Margin error can't get rid of left margin inside text box that contains image enginist Drawing and Graphics 2 08-04-2014 10:31 AM
Left Margin error No left margin when Mail Merging labels wardmiller Mail Merge 5 04-26-2014 11:10 PM
Left Margin error Making the second line of text in a numbered list wrap back to the left margin aaron12345 Word 1 06-19-2012 05:29 PM
Outlook Cuts Off Left Margin mrshufu Outlook 0 01-25-2012 12:02 PM
Left Margin error Running alphabets at left margins and pinpoint cites at right margin ghumdinger Word 3 05-05-2011 02:01 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:10 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