#1
|
|||
|
|||
Formatting custom data type in mail merge.
I have a merge field in a tab delimited csv file that is of the format ["element 1", "element2"] from 0 to 12 elements.
The csv file produced by a custom application (written in Swift on Mac) could be modified but not easy. The mail merge needs to display the elements of the filed one per line but only if the field exists. The merge document uses the csv file as its data source and the merge will ideally be triggered from the Mac application, possibly via a script but thats just a nice to have. I believe that this can be done by the built in VB, worked out how to get the value from the merge fields but no idea how to get the result from the function into the merge output. Assuming I need a field of some kind but thats were even my ability to google fails to find a clue. I have not used VB since version 3 too many moons ago to even remember! Not even sure I am going about this the right way. Client will be upgrading to Office 365 if I can get this too work as Pages on the Mac is . . . . Any suggestions / ideas much apricated. Ian |
#2
|
||||
|
||||
There is nothing in your post that indicates what the custom data types might be or what formatting is required.
For the conditional line output, see Mailmerge Empty Line Suppression in the Mailmerge Tips & Tricks 'Sticky' thread at the top of this forum: https://www.msofficeforums.com/mail-...ps-tricks.html No VBA needed for this.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
I have a merge field in a tab delimited csv file that is of the format ["element 1", "element2"] from 0 to 12 elements.
What other information is required? An example of the field in the csv would be <field separator tab>["element 1", "element2"]<field separator tab> The VB function takes that data and format it into a multi line string but I now need to call that function and display that result in the merged document. |
#4
|
||||
|
||||
Quote:
Quote:
Your ["element 1", "element2"], etc. do not constitute custom data types - in a tab-delimited file they are a single piece of data and, with the double-quotes, are liable to mess up a mailmerge.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is there a way to do a mail merge type of addition of data after a mail merge has been done? | mtandino | Word | 4 | 06-01-2021 02:00 PM |
Mail merge type fields in publisher | TerryTunesmith | Publisher | 1 | 02-12-2020 08:14 PM |
Mail Merge type is not being retained as ‘letter’ when document copied from one location to another | milnor | Mail Merge | 4 | 01-30-2019 01:37 PM |
Mail Merge Document Type | craigj | Mail Merge | 2 | 10-03-2016 08:39 PM |
Custom Mail Merge | luke | Mail Merge | 1 | 04-09-2013 03:10 PM |