Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-17-2021, 02:50 PM
jec1 jec1 is offline Set Layout Options Word vba Windows 7 32bit Set Layout Options Word vba Office 2013
Advanced Beginner
Set Layout Options Word vba
 
Join Date: Jan 2012
Posts: 69
jec1 is on a distinguished road
Default Set Layout Options Word vba


Hi everyone, I use a File Options macro to set Word Options. Any ideas welcome.

Think I have my answer use Set Compatibility Options works for the below options:

I currently set the other Options I require using:
Sub FileOptions_User2()
Application.ScreenUpdating = False
Call ToolsOptionsView
Call ToolsOptionsEdit
Call ToolsOptionsSave
Call ToolsOptionsTrackChanges
Call ToolsAutocorrect
End Sub

I can't figure out how to call the layout options in VBA. Has anyone done the Layout options with VBA?

Sub ToolsLayout()
With .Options
.wdSuppressBottomSpacings = False
.wdExpandShiftReturn
.wdSuppressTopSpacing -False
.wdNoSpaceForUL = False
.wdSuppressSpBfAfterPgBrk = False
End With
End Sub

Thank you.
Reply With Quote
  #2  
Old 09-18-2021, 11:09 AM
Peterson Peterson is offline Set Layout Options Word vba Windows 10 Set Layout Options Word vba Office 2019
Advanced Beginner
 
Join Date: Jan 2017
Posts: 86
Peterson is on a distinguished road
Default

Try this:


Code:
Sub ToolsLayout()
     With ActiveDocument
    
        .Compatibility(wdSuppressBottomSpacing) = False
        .Compatibility(wdExpandShiftReturn) = False
        .Compatibility(wdSuppressTopSpacing) = False
        .Compatibility(wdNoSpaceForUL) = False
        .Compatibility(wdSuppressSpBfAfterPgBrk) = False
        
    End With
End Sub
Reply With Quote
  #3  
Old 09-18-2021, 05:20 PM
jec1 jec1 is offline Set Layout Options Word vba Windows 7 32bit Set Layout Options Word vba Office 2013
Advanced Beginner
Set Layout Options Word vba
 
Join Date: Jan 2012
Posts: 69
jec1 is on a distinguished road
Default

Thank you Peterson.
Reply With Quote
  #4  
Old 09-22-2021, 10:28 AM
Charles Kenyon Charles Kenyon is offline Set Layout Options Word vba Windows 10 Set Layout Options Word vba Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 7,552
Charles Kenyon has much to be proud ofCharles Kenyon has much to be proud ofCharles Kenyon has much to be proud ofCharles Kenyon has much to be proud ofCharles Kenyon has much to be proud ofCharles Kenyon has much to be proud ofCharles Kenyon has much to be proud ofCharles Kenyon has much to be proud of
Default

General hammer and tongs method of setting options:
Record a macro setting those options.
Then clean it up in the vba editor to remove unwanted parts and redundancies.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set Layout Options Word vba Word Compatibility Options ldoodle Word VBA 2 11-01-2018 01:20 PM
Why is my document lose its layout when saving from MS Word 2010 to MS Word 2016 Format qadeerahmed Word 1 07-17-2017 04:59 AM
New Master doesn't show up in my layout options LadyBug679 PowerPoint 0 02-17-2017 10:44 AM
Set Layout Options Word vba Word Not Saving Options BriMercer Word 4 11-10-2009 11:00 AM
Set Layout Options Word vba Word options ehrenben Word 1 04-29-2009 02:27 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:56 AM.


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