-
May 11th, 2021, 07:55 AM
#1
New to Word Mail Merge
I want to take a Word document that a client gave me and produce letters through a mail merge with a SQL query.
Is there a way to specify a field name in the body of the word document as a "free text" entered token? Or do I need to marry it to the query and pin down each field specifically?
Thanks!
-
May 11th, 2021, 04:10 PM
#2
Re: New to Word Mail Merge
not quite sure what you are asking, i would think, generally all fields are returned, just with the records by criteria
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
May 11th, 2021, 04:40 PM
#3
Re: New to Word Mail Merge
I was hoping to make the Word Doc look something like the following:
This is a word paragraph and this is who we are addressing this to: {NameField}
That {token} would be what I was hoping you embedded in the Word doc and the query would just auto-connect the NameField column to this.
-
May 11th, 2021, 05:15 PM
#4
Re: New to Word Mail Merge
-
May 12th, 2021, 05:00 AM
#5
Re: New to Word Mail Merge
create a word mail merge document (or convert an existing document) and attaching the required merge source, then place mergefields for each of the required database fields in the appropriate positions within the document
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|