Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    New Lounger
    Join Date
    Oct 2015
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Catalogue/Directory Mailmerge-using mailmerge to create category based lists and email merge

    Hello,

    I have read the Catalogue/Directory Mailmerge tutorial and have learned a whole lot and would like to thank the author. However on this one project that I am working on which requires a mailmerge by category and then an email merge. I am having the most difficulty and have pulled most of my hair out! lol

    I have set up my mailmerge main document and have my data file in excel. I have created a mailmerge main document and have copy and pasted the same field codes and revised the fields to match my data. I have copy and pasted I have copy and pasted the macro in the macro section of the word document. I have attached the excel file as my list in the directory mail merge. I did not complete the mail merge but ran the RunMerge macro and got an error msg: "Method and member cannot be found" What am I doing wrong?

    I even copy and pasted the fields in the tutorial in the sample file and ran the macro and got the attached error. Please advise. Thanks, Maryam
    Attached Files Attached Files

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Without actually seeing your 'Email Merge Main Document' and your your Catalog/Directory mailmerge main document, it's impossible for anyone to diagnose the issue. Can you attach those document to a post with some representative data (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    New Lounger
    Join Date
    Oct 2015
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Catalogue/Directory Mailmerge-using mailmerge to create category based lists and email merge

    Quote Originally Posted by macropod View Post
    Without actually seeing your 'Email Merge Main Document' and your your Catalog/Directory mailmerge main document, it's impossible for anyone to diagnose the issue. Can you attach those document to a post with some representative data (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
    Thank you for quick response. Attached please find all my files. I made my mailmerge main document macro enabled. I appreciate the help since I am already past my deadline to present this report to management.
    Attached Files Attached Files

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Your mailmerge main document doesn't have any of the field structure described in the tutorial - all it has is a table with some text and a [ bracket before it and a ] bracket after it. If you select the corresponding table plus the [ bracket before it and a ] bracket after it in the tutorial and press Shift-F9, you'll see the field coding that is required.

    Your 'Email Merge Main Document' also contains a misnamed field - {MERGEFILED Data} - that you'll need to delete.
    Last edited by macropod; 2015-11-04 at 01:25.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    New Lounger
    Join Date
    Oct 2015
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Catalogue/Directory Mailmerge-using mailmerge to create category based lists and email merge

    Quote Originally Posted by macropod View Post
    Your mailmerge main document doesn't have any of the field structure described in the tutorial - all it has is a table with some text and a [ bracket before it and a ] bracket after it. If you select the corresponding table plus the [ bracket before it and a ] bracket after it in the tutorial and press Shift-F9, you'll see the field coding that is required.

    Your 'Email Merge Main Document' also contains a misnamed field - {MERGEFILED Data} - that you'll need to delete.
    RE: Email Merge Main Document. I deleted all the heading and corrected the field.
    RE: Mailmerge Main Document - I copy and pasted from your tutorial and change fields accordingly but when i toggle back the fields still read <<city>>, etc. I went ahead and manually changed it. what am I doing wrong?
    I did not attach the excel data file to the mailmerge main document because when I do that it automatically merges everything and next time i open the file is exactly what you saw. Am I supposed to?
    Attached Files Attached Files
    Last edited by MaryamF; 2015-11-04 at 06:12.

  6. #6
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    You need to delete the [ and ] from your mailmerge main document. Evidently, the document you posted before was not your mailmerge main document, but was an output document saved with that name.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  7. #7
    New Lounger
    Join Date
    Oct 2015
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Catalogue/Directory Mailmerge-using mailmerge to create category based lists and email merge

    Quote Originally Posted by macropod View Post
    You need to delete the [ and ] from your mailmerge main document. Evidently, the document you posted before was not your mailmerge main document, but was an output document saved with that name.
    Thanks for the hint. I removed the brackets. Ran the macro and got the "Method or data member not found"! what is missing?
    Thanks for all your help!
    Attached Images Attached Images
    Attached Files Attached Files

  8. #8
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    You have changed the macro code! Where you have (twice):
    If .Email = wdMainAndDataSource Then
    the macro in the tutorial has:
    If .State = wdMainAndDataSource Then
    I haven't checked what else you might have changed. I suggest you use the macro from the tutorial, as coded.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  9. #9
    New Lounger
    Join Date
    Oct 2015
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by macropod View Post
    You have changed the macro code! Where you have (twice):
    If .Email = wdMainAndDataSource Then
    the macro in the tutorial has:
    If .State = wdMainAndDataSource Then
    I haven't checked what else you might have changed. I suggest you use the macro from the tutorial, as coded.
    I thought that since my I changed the state mergefiled in the code for the mailmerge main document to my filed for email, I had to change it in the macro too for I have no state field. What was the logic here that I missed.

    Anyhow, I have already changed the following:
    1) the "Email" back to "State".
    2) Since I did not want the recipient name to be on the email merge, i had removed the line from the macro but i have put it back in.
    3) The only other change I made was to the subject line which I kept.
    After all the changes, I ran the macro again and got the attached error msg. Please advise. Thanks
    Attached Images Attached Images

  10. #10
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    I cannot read either the error message or the code line in your image - they're too small.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  11. #11
    New Lounger
    Join Date
    Oct 2015
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Catalogue/Directory Mailmerge-using mailmerge to create caterogy based lists and email merge

    I have attached a PDF version of the file. Hopefully you can read it clearly. Thanks
    Attached Files Attached Files

  12. #12
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    That suggests the document you're running the macro from is not a mailmerge main document (e.g. maybe you've managed to disconnect your mailmerge main document from the data source, with the result that its now just an ordinary document).
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  13. #13
    New Lounger
    Join Date
    Oct 2015
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Catalogue/Directory Mailmerge-using mailmerge to create category based lists and email merge

    Quote Originally Posted by macropod View Post
    That suggests the document you're running the macro from is not a mailmerge main document (e.g. maybe you've managed to disconnect your mailmerge main document from the data source, with the result that its now just an ordinary document).
    Hi,

    I just got home. Opened my mailmerge main document, followed the mail merge steps and added my data source, selected the sheet and hit ok but did not complete the mail merge however went to my macro, selected RunMerge from Normal.dot template and ran it. I again got run time error 91.

    Am I suppose to have all my files open?

  14. #14
    New Lounger
    Join Date
    Oct 2015
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Catalogue/Directory Mailmerge-using mailmerge to create category based lists and email merge

    Paul,

    I have copy and pasted the macro in my mailmerge main document right above my table, went to macro, selected to RunMerge from my mailmerge document and it almost worked! when I say almost is because I now get a new run time error 5174 which says it cannot find my Email Merge Main Document.doc which is in the folder. So I have attached my files again for you to please take a look at it and see what i have done wrong. Thanks
    Attached Files Attached Files

  15. #15
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Quote Originally Posted by MaryamF View Post
    selected RunMerge from Normal.dot template and ran it. I again got run time error 91.
    You wouldn't get that error if you followed the tutorial's instructions, which say to add the macro to the mailmerge main document...
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

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