Results 1 to 3 of 3

Thread: Issue with footer in word using vba

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2013
    Posts
    2

    Issue with footer in word using vba

    Hello All,

    My first post! Hope someone helps!

    I currently have a macro in Excel which opens a set of word docs, does some manipulation, saves the doc, closes the doc and then opens a new doc. Everything works fine till this point.

    Now, I want to add footer in each word doc (it may have more than 1 page) which is a construct. The footer should be "Some Text" & Pagenumber. Can anyone help me / guide me how to do this using vba? Thanks a lot.

  2. #2

    Thread Starter
    New Member
    Join Date
    May 2013
    Posts
    2

    Re: Issue with footer in word using vba

    For Example: First page footer should read: Rob-1, second page footer should read Rob-2, third page footer should read Rob-3 and so on....

  3. #3
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Issue with footer in word using vba

    footer pagenumbers are a field in word, try recording a macro in word to add page numbers, then convert the code to work within your existing code
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width