Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-22-2024, 03:20 AM
Rzv Rzv is offline Word macro that sets Different First Page = true Windows 10 Word macro that sets Different First Page = true Office 2016
Novice
Word macro that sets Different First Page = true
 
Join Date: Jun 2022
Posts: 3
Rzv is on a distinguished road
Default Word macro that sets Different First Page = true

I am really new to VBA and I am trying to make a macro that sets the header different first page to true, I am planning to use word batch processor's user-defined mode to make it work folder-wide but I cannot make it work
English is not my first language so sorry if I "talk" weird

This is my latest try, it works but only for singular documents, not batch

Sub HeaderFirstPage()


Let ActiveDocument.Sections(1).PageSetup.DifferentFirs tPageHeaderFooter = True
End Sub

Last edited by Rzv; 05-22-2024 at 03:44 AM. Reason: made it half-work
Reply With Quote
  #2  
Old 05-22-2024, 03:46 AM
Guessed's Avatar
Guessed Guessed is offline Word macro that sets Different First Page = true Windows 10 Word macro that sets Different First Page = true Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
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

PageSetup needs to know which section you are talking about and the section needs to know which document you are talking about.
Code:
Sub ImSpecial()
  ActiveDocument.Sections(1).PageSetup.DifferentFirstPageHeaderFooter = True
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Word macro that sets Different First Page = true Word Macro VBA | Insert images one by one, page by page leonelcd Word VBA 1 11-05-2023 03:28 PM
Macro to insert different sets of text at bookmark depending on sequence of selected check boxes chipper09 Word VBA 0 06-21-2018 01:49 PM
Loop true all opned word document elbartje Word VBA 1 06-12-2017 05:27 PM
Macro that formats (true title) case by Heading style Marrick13 Word VBA 11 09-20-2015 06:29 PM
Word macro that sets Different First Page = true Macro not staying true oluc Word VBA 4 11-21-2010 08:10 AM

Other Forums: Access Forums

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