Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code for carraige return in mail merge 3

Status
Not open for further replies.

HenryAnthony

Technical User
Feb 14, 2001
358
US
Hi,

I am trying to format carraige returns in a mail merge document using data from Access. I found some information that recommended using '^p' but this does not work for me. Any suggestions. Access and Word 2000.

Best regards,

Henry
 
Hi Heidi,

I am testing this using an excel spreadsheet and it is not working. Should I expect different results from an Access table/query?

Best regards,

Henry
 
there shouldn't be a difference.

I guess I'm confused - your data needs breaks within fields? or between fields? If between, you should have that part set up in Word with a simple carriage return on the word doc between the <<field>> thingys.

I've used bookmarks in Word to place fields correctly with an OLE feed.

HTH

Heidi I. Jones
Ridgerunner Consulting
Questions Answered. Problems Solved.
 
Break within fields. I have read some posts that describe carraige returns working and not working based on the machine the programs were running on. Our corporate installation of Windows and Office often does unusual things. I'll try my box at home and post back. Thanks for your help.
 
I don't know, but try reversing the order: chr$(13) & chr$(10), carriage return first, then linefeed (or if appliccable, either the vbCrLf or vbNewLine constants)

Roy-Vidar
 
Hi Roy,

I will try this tomorrow. I am helping my daughter with an application for an internship. As usual, IT IS DUE TOMORROW :(

Thanks so much,

Henry
 
I have tried every iteration of your suggestions and others I have found and can get nothing to work. I must be an idiot. Here is what I want to do:

Mail merge document includes a variable number of lines of variable information. Such as:

[data1] & "Some text"
[data2] & "Some other text"
[data3] & "Some other other text"

I want to add the carraige return at the end of the text string. Otherwise, if I manually put the returns in the Word document, I may end up with blank paragraphs.

I humbly beseech your assistance.

Henry the Meek
 
And this ?
[data1] & "Some text" & Chr(10)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Heidi, Roy and PVH,

I was entering the strings in a table and in a spreadsheet just to test and it would not work. After setting up a query similar to the final application chr(10) does indeed work. Funny thing, the query results show a small box where the return would be. Word sees this a carriage return.

In a table, entering a box similar what I see in the query such as alt+144 or 143 does not work. So I learn this must be done in a query to work.

Since you all were correct and willing to help me a star for you all.

Thanks sooooooo much,

Happy Henry
 
Funny thing, the first record of the query has no little box but, the line breaks anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top