Passing string from Access 2003 to Word 2003 form

J

jhawk

I'm using an Access 2003 database to fill in a Word form document. I want to
pass a string that, when inserted into a Word formfield, can include carriage
returns.

The code:

strVerification = "3.a)1. Venting analysis. " & vbCrLf & _
"3.a)2. Review of Design. " & vbCrLf & _
"3.a)3. QA Inspection and certification of the as-built " & _
"hardware per approved design drawing. " & vbCrLf & vbCrLf

docWord.FormFields("bmkVerification3").Result = strVerification

The desired result:

3.a)1. Venting analysis.
3.a)2. Review of Design.
3.a)3. QA Inspection and certification of the as-built hardware per approved
design drawing.

And not :

3.a)1. Venting analysis. 3.a)2. Review of Design. 3.a)3. QA Inspection and
certification of the as-built hardware per approved design drawing.

The above code simply doesn't work. Is there any string of characters, that
when passed to Word as a string, can be interpreted by Word to mean a
carriage return? Or is there a way to have Word automatically run a macro to
replace a special character with a carriage return?

Any help would much appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top