Hi, I’d like to know if there is any trimming of values when the mail merge is performed.
My scenario is this:
I have a Word template for letters with a header section, some transaction lines and a total section.
It’s one row in the data source. The data for the transaction lines of one letter are put into ONE single data field, formatted with line breaks and tabs. This data field is merged into a merge field called “Line1”.
The word template has suitable tab settings on the line containing the “Line1” merge field to make the data show in a nice tabbed layout.
This works perfectly except for the first line of the “line1” data.
The data happens to be laid out so that the first character of each line is a tab.
The first tab in the data field is being stripped off by the mail merge. I’ve checked the data and the tab is definitely in there when I have loaded the data into my datatable.
I did a few tests and it seems that the tab and any other whitespace I add in front of it is trimmed off automatically. If I cheat with the loaded data and add a printable character (a dot) in front, the tab is preserved and the layout is right. Except for the extra dot at the start of the first line, of course…
I’ve zipped the template document (it’s a .doc not a .docx) and an xml file showing sample data.
template doc and xml data example.zip (12.0 KB)
The “131” file is where I’ve added a dot in the data source and everything lines up nicely.
The “130” file shows the problem when there’s nothing in front of the first tab.
potenar131.docx (27.4 KB)
potenar130.docx (27.4 KB)
Is there any way of preventing this from happening? I don’t want to add random dots to my documents if it can be avoided
Thanks,
Karin