Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Word 2007 formatting Macro

  • 04-04-2013 12:02pm
    #1
    Registered Users, Registered Users 2 Posts: 81 ✭✭


    Hey All,

    I have no experience with macros what so ever, even how to run them. I would appreciate a little help here.

    I need to add the word file name (excluding extension) to the header and Page x 0f y to the footer of 650 word 2007 documents. Any help would be greatly appreciated. Thanks.
    Tagged:


Comments

  • Moderators, Technology & Internet Moderators Posts: 1,336 Mod ✭✭✭✭croo




  • Registered Users, Registered Users 2 Posts: 81 ✭✭inovo


    Are you saying go into each document and insert header and footer manually???


  • Moderators, Technology & Internet Moderators Posts: 1,336 Mod ✭✭✭✭croo


    :o Apologies I didn't read you post closely enough.


  • Registered Users, Registered Users 2 Posts: 81 ✭✭inovo


    Any ideas?


  • Moderators, Technology & Internet Moderators Posts: 1,336 Mod ✭✭✭✭croo


    inovo wrote: »
    Any ideas?
    Learn a little something about Macros & VBA? :)

    If I remember correctly you can "record a macro" and then use that to see what VBA code word uses to accomplish the task; i.e. switch on the record macro then proceed to add the footer as you wish .. when you stop you can look at the VBA code generated to see what it does. Mix that with something like this or maybe even this

    that or google a little more and you might get lucky and find someone has done exactly what you want

    ps, don't forget to backup before you loose a macro that updates all files in a folder!!


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,931 ✭✭✭PrzemoF


    I did something similar however I had to use excel + autocad.

    1. Make a document that will be your master, containing vba code. I'd suggest excel spreadsheet with list of the files that have to be modified.
    2. VBA code should take file name from the list, open it, modify header, close the file.
    3. move to next file on the list and go to 2. untill reaches end of the list.

    useful links:
    opening word file from excel vba

    modification of header from vba

    You said you have no experiance with vba - don't expect you'll be able to finish in within a couple hours as you have to learn some basics of vba first.


Advertisement