#1
|
|||
|
|||
Updating Headers & Footers from Database
Hi All,
I would like to change the Headers & Footers for the file from the folder based on the database. Like, I have the database for File Name, Headers and Footers. Would like to have a Word VBA where it should update Headers and footers based on the data base. For Example: Database: Filename | Headers | Footers AE.Docx | AE Sample Headers | AE Sample Footers |
#2
|
||||
|
||||
Headers and footers are formatted ranges which don't lend themselves to plain text held in a database. Are you intending to insert unformatted text into a specific location in the header/footer or inserting a complete replacement header/footer?
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
Would like to inserting a complete replacement header/footer as per the data base file.
Can we do that ? |
#4
|
||||
|
||||
Yes it can be done but we can't help you directly without knowing information like your intended workflow and database structure.
Perhaps you should investigate mail merges to see how to link fields in Word to a database. That methodology would avoid the need for using VBA to get the link.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#5
|
|||
|
|||
Thanks for the Suggestion.
Actually I would like to do it for bulk files, thats why i wanted to try through VBA. For EX: I have the files - ABC.docx, DEF.docx, GHI.docx, JKL.docx. And I have the data base for the headers & footers for these file. Like If file name is ABC.docx, then Headers text should be "ABC Headers" & footers text shoudl be "ABC Footers". Same goes for remaining File. I wanted to do a automation, where it should check the file name in the folder and correct headers & footers as per the database which i have. P.S: database which i am referring to is Excel file data base. |
#6
|
||||
|
||||
You can get information from Excel in a range of different ways. Here is one example
https://www.msofficeforums.com/word-...orm-entry.html Choosing to open a file based on a filename is shown in this thread https://www.msofficeforums.com/word-...cel-macro.html Putting content into a header can be a bit more complex as we still don't know whether you want to add or replace content and how many headers are present in each document. If you get the rest of the code working, post the code you have come up with and we can finish it off.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
Tags |
bulk, headers & footers, word vba |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
headers/footers | scot | Word | 3 | 05-22-2015 09:45 AM |
Headers and Footers | Kingsmoss | Word | 3 | 04-28-2014 02:43 PM |
Odd and Even Headers/Footers | sarineochaos | Word | 1 | 02-04-2014 06:15 PM |
Headers and Footers | teza2k06 | Word | 1 | 05-14-2013 11:07 AM |
Headers and Footers | OverAchiever13 | Word | 1 | 05-27-2010 01:30 PM |