Hi
My Access Database creates a Word Document using automation.
I'm using the Find.Execute method with ReplaceWith to insert a string where I have a place marker.
I need to insert a new line, carrage return, or paragraph character in the text.
Normally I use a Chr(13) or vbCr which works
In this case, I need to insert the string (containing new line char) into a cell of a word table, but instead of getting a new line, I just get a little square ([]) indicating an unprintable character.
I've tried other constants such as:
vbCrLf or Chr(13) + Chr(10)
vbCr or Chr(13)
vbLf or Chr(10)
vbNewLine or Chr(13) + Chr(10)
but none of these work.
Does anyone have any ideas?
Thanks
Zollo VBA Developer
![[thumbsup] [thumbsup] [thumbsup]](/data/assets/smilies/thumbsup.gif)
My Access Database creates a Word Document using automation.
I'm using the Find.Execute method with ReplaceWith to insert a string where I have a place marker.
Code:
Set objRange = mWordDocument.Content
objRange.Find.Execute FindText:="DateCcbPayableLong", Replacewith:=strDateCcbPayableLong, Replace:=wdReplaceAll
I need to insert a new line, carrage return, or paragraph character in the text.
Normally I use a Chr(13) or vbCr which works
In this case, I need to insert the string (containing new line char) into a cell of a word table, but instead of getting a new line, I just get a little square ([]) indicating an unprintable character.
I've tried other constants such as:
vbCrLf or Chr(13) + Chr(10)
vbCr or Chr(13)
vbLf or Chr(10)
vbNewLine or Chr(13) + Chr(10)
but none of these work.
Does anyone have any ideas?
Thanks
Zollo VBA Developer
![[thumbsup] [thumbsup] [thumbsup]](/data/assets/smilies/thumbsup.gif)