![]() |
#1
|
|||
|
|||
![]()
I have a quote mail merge template that contains products. In the source, Dynamics CRM, each product contains a sequence number (field). The user is able to modify the order of the products and CRM will adjust the sequence number accordingly. The problem is when the quote is printed, the order of the products always revert back to the original order in which they were entered and not by the sequence number.
In Word, you can manually set the order by opening the 'Edit Recipient List', find the quote_product_sequence_number field column, and sort. But I need this to be automated. I tried recording a macro as I walked through the manual steps, but the macro does not record anything when the 'Edit Recipient List' dialog box is open. I tried adding this code ... but I get an 'object required' error. Sub SequenceOrder() ' Sort by Sequence sequence = ActiveDocument.MailMerge.DataSource.DataFields("Qu ote_Product_Sequence_Number").Value sequence.Value.Sort SortOrder:=wdSortOrderAscending End Sub Any ideas? |
Tags |
mail merge, vba in microsoft word |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mail merge how to link mail merge field value to a column heading | dsummers | Mail Merge | 1 | 05-08-2014 02:59 PM |
![]() |
redzan | Mail Merge | 1 | 05-16-2013 08:34 AM |
![]() |
SaneMan | Mail Merge | 1 | 12-03-2011 01:11 AM |
dynamic charts based on mail merge fields | jwajehee | Mail Merge | 0 | 10-05-2011 09:47 AM |
![]() |
amym | Mail Merge | 1 | 12-07-2010 05:14 AM |