on 04-19-2012 10:55 AM
Hi all!
I've got a Word Template document with MailMerge Fields Bookmarked and set as properties in the File-Properties-Custom Properties. Copying the example in package SIOS, I can use this to transmit data from my WebDynpro into the ActiveX Control, and on into the Word Document. So far so good. The problem I have is when I want to pass multi-line data (longtexts) into the receiving MailMerge field. I'm presently passing a String, I guess within that there's some character I can use that will tell Word to throw a new line in it's MailMerge field?
When I use the cl_abap_char_utilities=>cr_lf as a separator, upon calling Word I get a load of MS Errors, asking how to separate the MailMerge fields. This throws data into the wrong receiving fields.
One (non-SAP) forum I found suggested using \V though this just resulted in "\V" sitting between my texts, all of which remained frustratingly on the same line.
Any help gratefully received!
Fixed it!
cl_abap_char_utilities=>vertical_tab for the win!
cl_abap_char_utilities=>cr_lf wouldn't work because the SIOS example uses that as it's "reached the end of this field" delimiter. I tried using other characters as the delimiter, but that seemed to confuse Word as the ACF was called. Word would then ask "What are we using as Tabs? What are we using as End Of Line?"
With vertical_tab, Word has something that tells it that it needs to go onto a new line, and it can do that until it hits a "cr_lf" which tells it that it needs to go to a new field.
Simples.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The vertical tab was used to throw CRLFs within an individual text box.
I don't know what effect the horizontal tab would have, the only thing I can think would be that the horizontal tab is triggering a "go to the next box" in the same way it would like on a webpage.
There's nothing obvious in cl_abap_char_utilities that looks like it could do the horizontal equivalent on the page... Sorry!
If you do get a solution, please do post it here, I'd be interested!
The rough and dirty way of doing it would be to force a truetype font, and then have the backend tidy up the data, using spaces instead of tabs, but that's pretty horrible solution.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.