Results 1 to 12 of 12
  1. #1
    Lounger
    Join Date
    Jan 2002
    Location
    Scotland, Midlothian, Scotland
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    No Pages field disappears after Merge (Word 97 SR2)

    I am using Access to merge data into a merge template document and then save it. All works find except that the 'Number of pages' field in the footer is set to the number of pages in the template document (2) and the field is deleted. There are two footers, one for the first page and one for all other pages. Any sugestsion as to how to;
    i. what causes this.
    ii. prevent it.
    iii. code to insert the Number of Pages field using VB after the document has been created.

  2. #2
    KTYorke
    Guest

    Re: No Pages field disappears after Merge (Word 97 SR2)

    I don't do merges at all but I have some things in the Word doc to check....
    i. & ii. The different first page is probably cause by the page setup of the Word document. Go into File/Page Setup/Layout and make sure Different First Page is unchecked.
    iii. I don't have anything for this at the moment, but I suspect our VBA savy loungers will pull something out of their bag-o-tricks for you soon.
    hope that helps
    have fun

  3. #3
    Lounger
    Join Date
    Jan 2002
    Location
    Scotland, Midlothian, Scotland
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: No Pages field disappears after Merge (Word 97 SR2)

    Thanks for the reply.
    I don't think this is related to the footer. I have also have a Word field for Create Date and this too is getting lost. The date the template was created is displayed after the merge.


    Thanks for your input though

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: No Pages field disappears after Merge (Word 97 SR2)

    I think if there are problems with the footer, it must be at least tangentially related to the footer. Can you post your template document (with merge fields, not data) for a look-see?

  5. #5
    Lounger
    Join Date
    Jan 2002
    Location
    Scotland, Midlothian, Scotland
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: No Pages field disappears after Merge (Word 97 SR2)

    Thanks for the reply. Since I have now found that it is also happening with the Date field on document2 I wonder whether the footer is at fault. Incidentially the date field on document2 is in a text box. I don't know if this could have anything to do with it.

    I have tried to attche the offending document but as it is a template document I cannot upload with this poast. I have made a document of it but do not know if this will be the same. The 'No Pages field' seems to be OK in this document.

    Any help would be appreciated.
    Attached Files Attached Files

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: No Pages field disappears after Merge (Word 97 SR2)

    Hmmm... I don't see anything wrong here. What happens if, instead of merging into a template-as-Main-Document, you merge into a regular document-as-Main-Document (similar to the one you posted)? Do the footer fields still convert to text and/or get deleted?

  7. #7
    Lounger
    Join Date
    Jan 2002
    Location
    Scotland, Midlothian, Scotland
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: No Pages field disappears after Merge (Word 97 SR2)

    Sorry for the long delay in getting back to you.
    I have tried using a document rather than a template as a source document withiout success. <img src=/S/bummer.gif border=0 alt=bummer width=15 height=15>. I have solved the date problem by passing todays date in the merge file and after some messing about found out how to format the Merge field.

    As an alternative do you know how to insert the number of pages field in the footer using code after the merge has taken place?

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: No Pages field disappears after Merge (Word 97 SR2)

    There may have been more recent posts with more efficient techniques, but I did post a VBA procedure in <!post=Post #69614 on the VBA board,69614>Post #69614 on the VBA board<!/post> that will cycle through the sections (assuming your results document has multiple sections) putting stuff in the footers. Hope this helps. (Note: in this particular example each footer had to be different, hence the weird way it started at the end, separated each footer from the one before it, and then changed it.)

  9. #9
    Lounger
    Join Date
    Jan 2002
    Location
    Scotland, Midlothian, Scotland
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: No Pages field disappears after Merge (Word 97 SR2)

    Thanks jscher2000 I will give that a try.

  10. #10
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: No Pages field disappears after Merge (Word 97 SR2)

    Hi John:
    I may be misunderstanding the problem & haven't tried this in awhile.

    When a document is merged with the data, the merge codes in the header and footer are not merging at all

  11. #11
    Lounger
    Join Date
    Jan 2002
    Location
    Scotland, Midlothian, Scotland
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: No Pages field disappears after Merge (Word 97 SR2)

    Hi Phil, thanks for your time.
    I am using the forn letter format, it is in fact a letter. The merge inserts the name and address and some other fields from an access database. The template document contains footer in which there no merge fields but there are Word Fields.

    The problem is that after the merge the <Page> field is OK but the <No. Pages> field gets converted to 1. The result is a document that on printing shows a page 2 footer as "Page 2 of 1". I have checked and the word field is in the template but not in the merged docuement. Using a template *.dot or a document *.doc as the merge definition document does not make any difference.

    As a temporary fix I have simply removed the <No.pages> word field from the footer but would like to get to the bottom of this as I have also found that it affects the <document create date> used for the date at the head of the letter.

    Any help would be appreciated.

  12. #12
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: No Pages field disappears after Merge (Word 97 SR2)

    Hi John:
    Have you tried updating the field. I just tried a 2 page letter in Word 2K & had no problems (although I used a Word document for a database). Take that back--just tried a query in an Access Database (using DDE) & it worked. The {page} & {numpage} fields in the header showed 1 of 40, 2 of 40 & then repeated. The same fields in the main body had to be selected & then updated. I won't be able to test it on Word 97 this week.

    Perhaps you could attach the main document (the form letter) to a post & we can look at it. Obviously the database can't be uploaded.

Posting Permissions

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