Richard,
In order to use a macro to import the individual lines in your comment boxes, you’ll need to break the comment apart and enter one line of data into cells going horizontally. First, import your Sales Orders using Integration Manager and then write a macro to go back and add the comments.
Since you already have the comments in Excel, it will be easy to separate the data.
- Embed a delimiter in your comment string delimiting each line. Use the formula =SUBSTITUTE(C1,CHAR(10),"|") change C1 to the address of your multi-line cell.
- Save the results of the formula to text (turn the formula into words)
- Using the Text to Columns function separate your string at the | delimiter.
- Example
|
SOP#
|
B1
|
C1
|
Changed to text
|
Text to column 1
|
Text to column 2
|
Text to column 3
|
|
INV023
|
Item#
|
Line 1
Line 2
Line 3
|
Line 1 of data|Line 2 of data|Line 3 of data
|
Line 1
|
Line 2
|
Line 3
|
Using Word, create your mail merge using the recorded macro.
The relevant part of the macro would look something like this:
TypeTo field 'Comment Text' , '<Line 1 of data>'
TNT_Event , '09003B012901000000000200005C06E238F0' # cntrl chr
TypeTo field 'Comment Text' , '<Line 2 of data>'
TNT_Event , '09003B012901000000000200005C06E238F0' # cntrl chr
TypeTo field 'Comment Text' , '<Line 3 of data>'
TNT_Event , '09003B012901000000000200005C06E238F0' # cntrl chr
TypeTo field 'Comment Text' , '<Line 4 of data>'
TNT_Event , '09003B012901000000000200005C06E238F0' # cntrl chr
TypeTo field 'Comment Text' , '<Line 5 of data>'
Include all 11 of your columns
I think you could get your macro ready with the least amount of pain using the method above.
Kind regards,
Leslie