G
Gandalf
Hi,
Using Word 2000 and automating with VB
I am utilising Document variables to fill in data in a word document. all is
fine until I come to try and insert a multi line field i.e.
I have a field {DOCVARIABLE "Address" \* MERGEFORMAT}
and from vb I am setting the value as
Selection.Document.Variables("Address") = myObj.Address
The code in myObj is roughly
Public Function Address() as string
Address="1 The Street"
Address=Address & vbCrLf & "Some Town"
End Function
However in the resulting document vbCrLf is replaced with 'squares'
Anyone any idea how to make it wrap?
Cheers
Using Word 2000 and automating with VB
I am utilising Document variables to fill in data in a word document. all is
fine until I come to try and insert a multi line field i.e.
I have a field {DOCVARIABLE "Address" \* MERGEFORMAT}
and from vb I am setting the value as
Selection.Document.Variables("Address") = myObj.Address
The code in myObj is roughly
Public Function Address() as string
Address="1 The Street"
Address=Address & vbCrLf & "Some Town"
End Function
However in the resulting document vbCrLf is replaced with 'squares'
Anyone any idea how to make it wrap?
Cheers