Results 1 to 12 of 12
  1. #1
    New Lounger
    Join Date
    Mar 2015
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    2010 Mail Merge Coding Help

    Hi All, I need some help with coding syntax for MailMerge. I'm using a code very similar to the one shown below and I'd like to incorporate the following:

    -How can I show a field with ""? When I add it in, it screws up the template.
    -How can I include an email hyperlink?
    -The text that appears on the bottom of each page does not appear on the very last page, why?

    Some questions:
    -Why can't I copy the code from the Word document?
    -Is there any way to keep the code visible? When I toggle page, the code disappears and I have to keep using Shift-F9 to display the code
    -Why is it that in the below code, it has to specify MERGEFIELD; whereas, when you just use the Rules to add and If/Then, it doesn't require it?

    Code:
    {QUOTE{IF{MERGESEQ}=1 {SET Key “”} {SET LastKey {Key}}}{IF{MERGEFIELD Student}<> {Key} “{IF{MERGESEQ}> 1”
    This text here is shown at the bottom of the page (BUG: does not appear on the very last page).
    {IF{MERGEFIELD Student}<> 0 {QUOTE 12}}”}{IF{MERGEFIELD Student}<> 0 “Dear Student, {SET Key {MERGEFIELD Student}}
    The following are your classes:
    Student: {MERGEFIELD Student \* Charformat}
    “}”}”{IF{MERGEFIELD Student}<> 0”{MERGEFIELD Course}/{MERGEFIELD Teacher}”}”}
    Thanks for any help!!
    Last edited by mcmuney; 2015-03-20 at 12:57.

  2. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Quote Originally Posted by mcmuney View Post
    ***
    Some questions:
    -Why can't I copy the code from the Word document?
    -Is there any way to keep the code visible? When I toggle page, the code disappears and I have to keep using Shift-F9 to display the code.
    Because all Word will copy to the clipboard is the field result. You can use a macro to do this. See http://www.gmayor.com/export_field.htm.

    Try Alt+F9. This is a toggle setting which is sticky. It is for your entire Word application and the setting stays until you change it.
    Charles Kyle Kenyon
    Madison, Wisconsin

  3. #3
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Quote Originally Posted by mcmuney View Post
    ***
    -How can I show a field with ""? When I add it in, it screws up the template.
    -How can I include an email hyperlink?
    -The text that appears on the bottom of each page does not appear on the very last page, why?

    ***!
    Are you trying to insert nothing or two ditto marks? These marks can have special meaning when inside a field.

    How are you trying to include an email hyperlink? What is your source data? What result do you want/expect?

    Probably because the text at the bottom of the page (footer) is inside a conditional field (IF Field) that tests for the page number being equal to the number of pages.

    See Mailmerge.
    Charles Kyle Kenyon
    Madison, Wisconsin

  4. #4
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Quote Originally Posted by mcmuney View Post
    ***

    Some questions:

    -Why is it that in the below code, it has to specify MERGEFIELD; whereas, when you just use the Rules to add and If/Then, it doesn't require it?

    ***
    It says MERGEFIELD because you are using a merge field rather than an IF field. They are different kinds of fields.
    Charles Kyle Kenyon
    Madison, Wisconsin

  5. #5
    New Lounger
    Join Date
    Mar 2015
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Charles Kenyon View Post
    -Probably because the text at the bottom of the page (footer) is inside a conditional field (IF Field) that tests for the page number being equal to the number of pages.
    I tried the link, but all the {page} numbers are producing 1, so that can't be used. Any other suggestions? I really need a fix.

    Thanks for the help.
    Last edited by mcmuney; 2015-03-20 at 16:03.

  6. #6
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Quote Originally Posted by mcmuney View Post
    I tried the link, but all the {page} numbers are producing 1, so that can't be used. Any other suggestions? I really need a fix.

    Thanks for the help.
    I'll tell you what. You tell me how to fix my car and I'll tell you how to get text on the bottom of your last page.

    I am dealing with sick grandchildren right now. I haven't told you anything about what is wrong with my car. Well, it won't go. Is that enough for you to tell me how to make it go?

    You need to tell me a lot more about what you are trying to do and why before I (or anyone else) can have any chance to help you.

    I gave you a link to a page on mail merge. Did you read it?
    I gave you a link to some information about IF fields. You tried it?

    All the page numbers are producing 1. They will do that in a one-page letter mail merge.

    I broke your multiple questions out into three replies so I could better respond. I asked you some questions about what you are doing, and why. So far you haven't helped me help you.
    Charles Kyle Kenyon
    Madison, Wisconsin

  7. #7
    New Lounger
    Join Date
    Mar 2015
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Charles Kenyon View Post
    I'll tell you what. You tell me how to fix my car and I'll tell you how to get text on the bottom of your last page.

    I am dealing with sick grandchildren right now. I haven't told you anything about what is wrong with my car. Well, it won't go. Is that enough for you to tell me how to make it go?

    You need to tell me a lot more about what you are trying to do and why before I (or anyone else) can have any chance to help you.

    I gave you a link to a page on mail merge. Did you read it?
    I gave you a link to some information about IF fields. You tried it?

    All the page numbers are producing 1. They will do that in a one-page letter mail merge.

    I broke your multiple questions out into three replies so I could better respond. I asked you some questions about what you are doing, and why. So far you haven't helped me help you.
    Ok, so let me try this again the right way. I did read them, but I must have been confused about what I read about the last page. Based on what you just said, they were referring to the last page of a multi-page letter; whereas, I was thinking last page of the total document. Mine produces a one-page letter, in which case, now it makes sense that they'll all be page 1.

    So you under my issue better, I'm including the code and the merge file that it produces (pdf file: MM Sample_Test.pdf), which shows the problem. I've added my comments in the file in blue. I hope this makes the issue more clear. Thanks.

    Code:
    { QUOTE{ IF{ MERGESEQ }= 1 { SET Key "" }{ SET LastKey { Key } } }{ IF{ MERGEFIELD MultiOwner_Groups }<> { Key } "{ IF{ MERGESEQ }> 1 "
    Thank you for your time and let me know if I can be of further assistance.
     
    Sincerely,
    John.****@gmail.com
    { IF{ MERGEFIELD MultiOwner_Groups }<> 0 { QUOTE 12 } }" }{ IF{ MERGEFIELD MultiOwner_Groups }<> 0 "{ DATE \@ "MMMM d, yyyy" } { SET Key { MERGEFIELD MultiOwner_Groups }}
     
    Dear Sir,
     
    I am writing you, because I am interested in assisting you with the properties listed below:
     
    "}"}{ IF{ MERGEFIELD MultiOwner_Groups }<> 0 "{ MERGEFIELD Site_Address_Street_Name }, { MERGEFIELD Site_Address_CityState }" } }

  8. #8
    New Lounger
    Join Date
    Mar 2015
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok, I did some further digging and was able to partially solve my problem. By inserting a dummy row on the database, I was able the get the content after the repeated data to appear on the last record page. However, there's still a problem. Because I'm using bullets on my repeated data, a single bullet appears at the very end of the last page, which I need to get rid of. (See last page on test file: MM Sample_Test2.pdf)

    If I don't use bullets, there's no problem, but I'd like to use them. Any thoughts?

    On a side note, when using numbered bullets, on new record pages, the numbering does not reset, is there a way to fix that?

    Thanks!
    Last edited by mcmuney; 2015-03-21 at 13:33.

  9. #9
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Numbered bullets, very different issues. If you set your bullets up according to the rules on this page, you could put a level 1 blank paragraph, with no numbering at the beginning or end of your page and have numbering for your bullets restart after that level. (Your bullets would be on numbering level 2.)

    See also the related page on numbering.
    Charles Kyle Kenyon
    Madison, Wisconsin

  10. #10
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts
    I am far from an expert on the QUOTE field or on MailMerge. I would recommend posting any remaining questions on this mailmerge forum.
    Last edited by Charles Kenyon; 2015-03-22 at 14:09.
    Charles Kyle Kenyon
    Madison, Wisconsin

  11. #11
    New Lounger
    Join Date
    Mar 2015
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Charles Kenyon View Post
    I am far from an expert on the QUOTE field or on MailMerge. I would recommend posting any remaining questions on this mailmerge forum.
    I just came across a new issue. When I attempt to incorporate a field in the closing paragraph, the data that appears is from the Next record and not the current record. Are you familiar with this? This is a bigger problem than the bullets.

    Thanks for you help though. I'll check out the other forum as well.

  12. #12
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Again, I would urge you to try the mailmerge forum. You have exceeded my experience base.
    Charles Kyle Kenyon
    Madison, Wisconsin

Posting Permissions

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