To have Data Merge remove blank lines they must by completely blank. You could add the letter prefix to the number in the data file.
You could also do a find/replace (or, rather two of them if needed) to remove the leading character.
So for your "D" phone number example, you would do a F/R after the merge like so:
If I remembered the syntax correctly, anyway. It finds the literal 'D' followed by a space, followed by an empty merge field marker, followed by a return. Replace would be with nothing.
Else consider using a merge product that has the conditional capabilities. Em Software makes one such plug-in. I use Xdata for QuarkXpress a good bit, their InDesign counterpart is called InData.
The leading character should be included into the paragraph style, even if it is a word. If the removal of blank lines is activated, these leading characters are removed too.
To add leading characters into a paragraph style, you have to define a numbered list without numbers but with the leading character and the space or tab between.
Thank you! I will play with this syntax and hopefully learn some new syntax on my own.
Genius! This sounds like the most straightforward method for me, since I'll want to style the phone tags (the single letters) differently from the number itself. Thanks!!