Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-19-2022, 07:50 PM
Guessed's Avatar
Guessed Guessed is offline Word VBA overlay and restore word2016 heading / footer style Windows 10 Word VBA overlay and restore word2016 heading / footer style Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,166
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Your code is not specifying the style in the Header. If you want to control the look of the header then you should apply a style to that range (and make sure the style looks the way you want it to).
Code:
Word.ActiveDocument.Sections(1).Headers(1).Range.Style = "Header"
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 

Tags
header and footer, vba code, word2016



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word VBA overlay and restore word2016 heading / footer style Word: adding tabs to a heading style sakols Word 11 05-31-2019 10:02 AM
Word 2010 Having more than one font for same style heading normancamp Word 1 08-06-2018 02:21 PM
How to restore my Style Header 3? jongleur Word 3 05-16-2017 10:48 AM
Word VBA overlay and restore word2016 heading / footer style How to Restore Heading 1, Heading 2, etc. within a Word Document cheech1981 Word 9 01-11-2017 02:14 AM
Word VBA overlay and restore word2016 heading / footer style Very frequent heading style, but still not built in Word!!!!! why??? Jamal NUMAN Word 17 06-30-2011 05:47 PM

Other Forums: Access Forums

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


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