Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-27-2020, 01:48 AM
Tesla Tesla is offline using mailmerge to include a grouped information in a letter Windows 7 32bit using mailmerge to include a grouped information in a letter Office 2003
Advanced Beginner
using mailmerge to include a grouped information in a letter
 
Join Date: Sep 2018
Posts: 44
Tesla is on a distinguished road
Default using mailmerge to include a grouped information in a letter

Hello,
I wish to prepare a letter to debtors of my company showing them invoices not yet paid so that they can pay. The letter should contain invoice number, invoice date and amount of that invoice. I have a long list of debtors to write to and I am wondering if mail merge could help me doing so. Each debtor has a long list of invoices which I want to group on one letter sent to that debtor (one letter can have more than one page).



I tried to use the technique of "Microsoft Word Catalogue/Directory Mailmerge Tutorial", but the code provided in the tutorial is not working because I am very beginner in this kind of mail merge, I donít know how to do it. I copied the code contained in the tutorial but I failed to connect the code with the table containing the data of my debtors.

I attach my excel document containing data I want to insert into a letter. I also attach my letter but the code is not working. If you can provide me some help I would be thankful.
Attached Files
File Type: xls list.xls (19.0 KB, 3 views)
File Type: docx letter.docx (12.0 KB, 2 views)
Reply With Quote
  #2  
Old 05-27-2020, 04:23 AM
macropod's Avatar
macropod macropod is offline using mailmerge to include a grouped information in a letter Windows 7 64bit using mailmerge to include a grouped information in a letter Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,451
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

You really don't appear to have invested any more effort in this than copying the field code from the mailmerge main document into your own document. You haven't even bothered to insert any of your own mergefields. As discussed under the topic Merging to Tables and demonstrated in Calculating Group and Sub-Group Totals in the tutorial, you need to incorporate your table header row and a data row into to field code.

See attached.
Attached Files
File Type: docm letter.docm (21.0 KB, 5 views)
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 05-27-2020, 10:06 AM
Tesla Tesla is offline using mailmerge to include a grouped information in a letter Windows 7 32bit using mailmerge to include a grouped information in a letter Office 2003
Advanced Beginner
using mailmerge to include a grouped information in a letter
 
Join Date: Sep 2018
Posts: 44
Tesla is on a distinguished road
Default

Thank very much for your help. However, I am having a problem of showing the data in group form. Data is coming in single entry. Kindly find attached the the result I have.
Attached Files
File Type: docx letter-2.docx (17.2 KB, 7 views)
Reply With Quote
  #4  
Old 05-27-2020, 04:19 PM
macropod's Avatar
macropod macropod is offline using mailmerge to include a grouped information in a letter Windows 7 64bit using mailmerge to include a grouped information in a letter Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,451
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

You need to at least read the tutorial, especially the topics Introduction and Set Up the Main Mailmerge Document.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #5  
Old 05-28-2020, 07:46 AM
Tesla Tesla is offline using mailmerge to include a grouped information in a letter Windows 7 32bit using mailmerge to include a grouped information in a letter Office 2003
Advanced Beginner
using mailmerge to include a grouped information in a letter
 
Join Date: Sep 2018
Posts: 44
Tesla is on a distinguished road
Default

Thank you, I followed all the steps from 1 to 8 of Set Up the Main Mailmerge Document. I may have made an error somewhere but I don't know where.
On my mail merge document directory submenu is active. Browser was done to identify my source data. But the result is not as intended, only one entry is being displayed per page.
Reply With Quote
  #6  
Old 05-28-2020, 02:17 PM
macropod's Avatar
macropod macropod is offline using mailmerge to include a grouped information in a letter Windows 7 64bit using mailmerge to include a grouped information in a letter Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,451
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

See revised attachment in post 2.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #7  
Old 05-29-2020, 11:57 PM
Tesla Tesla is offline using mailmerge to include a grouped information in a letter Windows 7 32bit using mailmerge to include a grouped information in a letter Office 2003
Advanced Beginner
using mailmerge to include a grouped information in a letter
 
Join Date: Sep 2018
Posts: 44
Tesla is on a distinguished road
Default

Hello,
I used the document as you advised but at the time of Edit individual document, I received this message: "The macros in this project are disabled. Please refer to the online help or documentation for the host application to determine how to enable macros."
Thank you for your patience in helping me.
Reply With Quote
  #8  
Old 05-30-2020, 12:27 AM
macropod's Avatar
macropod macropod is offline using mailmerge to include a grouped information in a letter Windows 7 64bit using mailmerge to include a grouped information in a letter Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,451
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Go to File|Options|Trust Center>Trust Center Settings and choose the second item - 'Disable all macros with notification'. That will allow you to choose whether to enable macros in a document. The attachment to post 2 contains a macro that's needed to make the table generation seamless when you click on Finish & Merge>Edit Individual Documents.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #9  
Old 05-30-2020, 02:22 AM
Tesla Tesla is offline using mailmerge to include a grouped information in a letter Windows 7 32bit using mailmerge to include a grouped information in a letter Office 2003
Advanced Beginner
using mailmerge to include a grouped information in a letter
 
Join Date: Sep 2018
Posts: 44
Tesla is on a distinguished road
Default

Hello again,
I am using Microsoft word 2007 and file>option is not visible. I have word options and I cannot see Trust Center Settings. Kindly find my screen on attachment.


On the other hand, I tried the code contained in the tutorial Using Mailmerge To Create Category-Based Lists. I copied it and pasted it on a blank page of Microsoft word 2007. The code I used is the one contained under this heading: Using an Extra Field to Generate the Trailing Content Per Group (Using One Key). If the code had accepted to work, I could have replaced merge fields and put my own from my own data source. Unfortunately, the code did not provide same results as those contained in the tutorial. It is repeating all information below the list after putting the first list item and before putting a next, whereas in the tutorial, all list items are presented before putting concluding information.

I am really a beginner in this matter and I really need your help because I have to work with long list of debtors each one with a number of invoices.

Your help is highly welcome. Thank you for helping me.
Reply With Quote
  #10  
Old 05-30-2020, 02:28 AM
macropod's Avatar
macropod macropod is offline using mailmerge to include a grouped information in a letter Windows 7 64bit using mailmerge to include a grouped information in a letter Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,451
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Kindly update your profile to accurately reflect the OS & Office version you're using. There is also nothing attached to your post.

See: Expand your file-protection options via Microsoft Office 2007's Trust Center - CNET

Regardless, the mailmerge can be used without the macro embedded in the attachment, but then you'll need to use the TableJoiner macro in the tutorial - or join all the table rows manually.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #11  
Old 05-30-2020, 02:44 AM
Tesla Tesla is offline using mailmerge to include a grouped information in a letter Windows 7 32bit using mailmerge to include a grouped information in a letter Office 2003
Advanced Beginner
using mailmerge to include a grouped information in a letter
 
Join Date: Sep 2018
Posts: 44
Tesla is on a distinguished road
Default

view: is screenshot
code from tuto: is the copied code

test from tuto: is the output after testing the code on my blank page
Attached Files
File Type: docx view.docx (203.9 KB, 4 views)
File Type: docx code from tuto.docx (13.7 KB, 1 views)
File Type: docx test from tuto.docx (13.8 KB, 1 views)
Reply With Quote
  #12  
Old 05-30-2020, 02:50 AM
macropod's Avatar
macropod macropod is offline using mailmerge to include a grouped information in a letter Windows 7 64bit using mailmerge to include a grouped information in a letter Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,451
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Quote:
Originally Posted by Tesla View Post
view: is screenshot
So click on 'Word Options'...

As for your other attachments, I have already supplied a document with fully-tested and working field coding in post #2.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #13  
Old 05-30-2020, 03:28 AM
Tesla Tesla is offline using mailmerge to include a grouped information in a letter Windows 7 32bit using mailmerge to include a grouped information in a letter Office 2007
Advanced Beginner
using mailmerge to include a grouped information in a letter
 
Join Date: Sep 2018
Posts: 44
Tesla is on a distinguished road
Default

Yes, the attachment in post no.2 is what I am using. And I did Trust Center but I receive the same message, see the screen shot on attachment.
Attached Files
File Type: docx trust center.docx (416.8 KB, 7 views)
Reply With Quote
  #14  
Old 05-30-2020, 04:35 AM
macropod's Avatar
macropod macropod is offline using mailmerge to include a grouped information in a letter Windows 7 64bit using mailmerge to include a grouped information in a letter Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,451
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Your second screenshot shows that Word has given you a macro security alert, next to which is an Options button. Click on that and enable macros.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #15  
Old 06-01-2020, 08:32 AM
Tesla Tesla is offline using mailmerge to include a grouped information in a letter Windows 7 32bit using mailmerge to include a grouped information in a letter Office 2007
Advanced Beginner
using mailmerge to include a grouped information in a letter
 
Join Date: Sep 2018
Posts: 44
Tesla is on a distinguished road
Default

Thank you macropod , the code works, but as a beginner I don't understand why concluding phrase is put before introductory phrase in the code. I will keep trying to make a desired content (putting totals) and font (Bold, Italics, font style). I will come back after some time to tell you that I have been able to produce desired letter. Thank you abundantly. God bless you.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
using mailmerge to include a grouped information in a letter Macro to insert an image to a word mailmerge document based on the value of a mailmerge field? Jake93 Word VBA 3 07-02-2019 05:38 PM
using mailmerge to include a grouped information in a letter Use L and R arrow to move cursor letter to letter, not top of the line mellowkitten Word 2 05-12-2016 07:23 PM
How to replace a letter to random letter with different color? cikanoz87 Word 7 06-18-2015 09:43 PM
using mailmerge to include a grouped information in a letter Mailmerge with grouped data Keith Henderson Mail Merge 14 02-04-2015 01:45 PM
Directory MailMerge with Category Grouped Lists on Labels screech Mail Merge 3 06-18-2014 11:41 PM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 07:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft