Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 02-11-2019, 08:21 AM
gmayor's Avatar
gmayor gmayor is offline Running Macro in Multiple word files Windows 10 Running Macro in Multiple word files Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

You could use http://www.gmayor.com/document_batch_processes.htm to handle the documents and run the following as a custom process:


Code:
Function AddFooter(oDoc As Document) As Boolean
    On Error GoTo err_Handler
    Dim oSection As Section
    Dim oFooter As HeaderFooter
    For Each oSection In oDoc.Sections
        For Each oFooter In oSection.Footers
            If oFooter.Exists Then
                oFooter.Range.Text = "Confidential - Not for distribution"
            End If
        Next oFooter
    Next oSection
    AddFooter = True
lbl_Exit:
    Exit Function
err_Handler:
    AddFooter = False
    Resume lbl_Exit
End Function
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running Macro in Multiple word files Run a macro on multiple docx. files Peter Carter Word VBA 27 12-15-2022 04:10 PM
Macro for multiple RTF files papapaleo Word VBA 1 07-28-2017 04:56 AM
Running Macro in Multiple word files Macro for Combining Multiple Word Files Together Into One Document rsrasc Word VBA 2 10-31-2014 07:58 AM
Word 2010 running multiple instances JBE Word 0 09-28-2012 06:00 PM
Running Macro in Multiple word files looking for macro for multiple files bolk Word 3 05-03-2011 05:46 AM

Other Forums: Access Forums

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