dbTalk Databases Forums  

couple of questions on mail merge

comp.databases.ms-access comp.databases.ms-access


Discuss couple of questions on mail merge in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sparks
 
Posts: n/a

Default couple of questions on mail merge - 07-22-2010 , 08:13 AM






I have used Mr Kallal word merge in the past and found it to be a
great thing.

I am doing a new one and have a couple of questions.

I have 5 single page documents that have to be sent based on certain
things in the database.
So if its month 1 they get document 1
month 2 and X they get document 2
and so on.

How do I output when there are 5 different documents?
a seperate routine and output for each document ?
They hinted at one run and one output.

They sent over pdf's because they have co pics and stuff all over
them.

If I am not mistaken this is WORD merge and not a PDF merge.
Am I correct on this?
Wanted to ask before saying anything.

Reply With Quote
  #2  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: couple of questions on mail merge - 07-22-2010 , 03:13 PM






"sparks" <sparks (AT) home (DOT) com> wrote

Quote:
I have used Mr Kallal word merge in the past and found it to be a
great thing.

I am doing a new one and have a couple of questions.

I have 5 single page documents that have to be sent based on certain
things in the database.
So if its month 1 they get document 1
month 2 and X they get document 2
and so on.

How do I output when there are 5 different documents?
a seperate routine and output for each document ?
The above is most easy if you make a separate "run" for each document

You can use:
MergeNoPrompts
strFromDocTemplate,[strDir],[bolFullPath],[strOutPutDoc],[strSql],[bolPrint],[strPrinter]

So:

strSql = "select * from tblCustomers where DocTheyGet = 1"

MergeNoPrompts "Document1.doc",,,strSql,True

strSql = "select * from tblCustomers where DocTheyGet = 2"

MergeNoPrompt "Document2.doc",,,strSql,True

etc. I not filled in all above options, but that is the suggestion here.


Quote:
They hinted at one run and one output.
To "mix" in different merges into one output document is a good deal of
extra work.

Quote:
They sent over pdf's because they have co pics and stuff all over
them.

If I am not mistaken this is WORD merge and not a PDF merge.
Am I correct on this?
Wanted to ask before saying anything.
Yes, this sends output to word. You might consider using a report if your
looking for PDF output. I suppose you could after the word merge is done is
then save the word merge doc as a pdf since word 2007/2010 does have save as
PDF ability now.


Albert K.

Reply With Quote
  #3  
Old   
sparks
 
Posts: n/a

Default Re: couple of questions on mail merge - 07-27-2010 , 07:34 AM



Thanks very much.
I like the seperate output.
I was trying to put it all in one and I can see where this would cause
more work on the final output.

I like this as I have seen several times the output you create is the
only way for them to complete a printout, since as you know things
happen when they are surprised at how many documents they are printing
and jams, out of paper and things and why do I only have 1-127...where
is the rest.

And to try and explain about print spoolers and yes access did print
it all ROFL

For them to print out documents based on the batch will be a better
and safer way to go.






On Thu, 22 Jul 2010 14:13:59 -0600, "Albert D. Kallal"
<PleaseNOOOsPAMmkallal (AT) msn (DOT) com> wrote:

Quote:
"sparks" <sparks (AT) home (DOT) com> wrote in message
news:vhgg46ttfps9as8vesr0t0jr5e6nf30hpf (AT) 4ax (DOT) com...

I have used Mr Kallal word merge in the past and found it to be a
great thing.

I am doing a new one and have a couple of questions.

I have 5 single page documents that have to be sent based on certain
things in the database.
So if its month 1 they get document 1
month 2 and X they get document 2
and so on.

How do I output when there are 5 different documents?
a seperate routine and output for each document ?

The above is most easy if you make a separate "run" for each document

You can use:
MergeNoPrompts
strFromDocTemplate,[strDir],[bolFullPath],[strOutPutDoc],[strSql],[bolPrint],[strPrinter]

So:

strSql = "select * from tblCustomers where DocTheyGet = 1"

MergeNoPrompts "Document1.doc",,,strSql,True

strSql = "select * from tblCustomers where DocTheyGet = 2"

MergeNoPrompt "Document2.doc",,,strSql,True

etc. I not filled in all above options, but that is the suggestion here.


They hinted at one run and one output.

To "mix" in different merges into one output document is a good deal of
extra work.


They sent over pdf's because they have co pics and stuff all over
them.

If I am not mistaken this is WORD merge and not a PDF merge.
Am I correct on this?
Wanted to ask before saying anything.

Yes, this sends output to word. You might consider using a report if your
looking for PDF output. I suppose you could after the word merge is done is
then save the word merge doc as a pdf since word 2007/2010 does have save as
PDF ability now.


Albert K.

Reply With Quote
  #4  
Old   
sparks
 
Posts: n/a

Default Re: couple of questions on mail merge - 07-29-2010 , 08:42 AM



Got it all set up and exactly what they want.
Working fine until one person didn't like it.

What do you do if they have 500 forms to print and they just want to
print 120?

I thought about either just directing the output to a file only and
then they print out what they want from the file.

They thought about that and said well if thats all you can do.
What do you want?

we thought about a box that we put in how many we want to print.
100 for example
then it would print the first 100.
then we would put in 100 again and it would print out the next 100
I have fields for exproted so its set to a 1 and a field for the
exported file name.
so I could say start printing where we left off by exported <>1

my questions

How do I limit it to the first 100?

How do I only print out to the file without the printer?



On Tue, 27 Jul 2010 07:34:13 -0500, sparks <sparks (AT) home (DOT) com> wrote:

Quote:
Thanks very much.
I like the seperate output.
I was trying to put it all in one and I can see where this would cause
more work on the final output.

I like this as I have seen several times the output you create is the
only way for them to complete a printout, since as you know things
happen when they are surprised at how many documents they are printing
and jams, out of paper and things and why do I only have 1-127...where
is the rest.

And to try and explain about print spoolers and yes access did print
it all ROFL

For them to print out documents based on the batch will be a better
and safer way to go.






On Thu, 22 Jul 2010 14:13:59 -0600, "Albert D. Kallal"
PleaseNOOOsPAMmkallal (AT) msn (DOT) com> wrote:

"sparks" <sparks (AT) home (DOT) com> wrote in message
news:vhgg46ttfps9as8vesr0t0jr5e6nf30hpf (AT) 4ax (DOT) com...

I have used Mr Kallal word merge in the past and found it to be a
great thing.

I am doing a new one and have a couple of questions.

I have 5 single page documents that have to be sent based on certain
things in the database.
So if its month 1 they get document 1
month 2 and X they get document 2
and so on.

How do I output when there are 5 different documents?
a seperate routine and output for each document ?

The above is most easy if you make a separate "run" for each document

You can use:
MergeNoPrompts
strFromDocTemplate,[strDir],[bolFullPath],[strOutPutDoc],[strSql],[bolPrint],[strPrinter]

So:

strSql = "select * from tblCustomers where DocTheyGet = 1"

MergeNoPrompts "Document1.doc",,,strSql,True

strSql = "select * from tblCustomers where DocTheyGet = 2"

MergeNoPrompt "Document2.doc",,,strSql,True

etc. I not filled in all above options, but that is the suggestion here.


They hinted at one run and one output.

To "mix" in different merges into one output document is a good deal of
extra work.


They sent over pdf's because they have co pics and stuff all over
them.

If I am not mistaken this is WORD merge and not a PDF merge.
Am I correct on this?
Wanted to ask before saying anything.

Yes, this sends output to word. You might consider using a report if your
looking for PDF output. I suppose you could after the word merge is done is
then save the word merge doc as a pdf since word 2007/2010 does have save as
PDF ability now.


Albert K.

Reply With Quote
  #5  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: couple of questions on mail merge - 07-30-2010 , 03:59 PM



sparks" <sparks (AT) home (DOT) com> wrote


Quote:
my questions

How do I limit it to the first 100?
You have to some means to build a sql query that limits this to the 100
records.

strSql = "select * from tblCustomer where invoice <= '12764'"

Or, perhaps you write code that finds the 100's record, company name
and then go like:

strSql = "select * from tblCustomer where CompanyName <= 'some name'" & _
" ordery by CompanyName"

MergeAllWord strSql

I suppose you could consider modifying the output code in my merge to
limit the records sent out to the merge file. I should consider adding this
as a feature. However, some approach like the above in the meantime
would likely be less coding.

Quote:
How do I only print out to the file without the printer?
You mean create the merge document, save it, but not print?

MergeNoPrompts should let you do this:

MergeNoPrompts
strFromDocTemplate,[strDir],[bolFullPath],[strOutPutDoc],[strSql],[bolPrint],[strPrinter]

strFromDoc = name of template to merge from

strDir = optional - directory to use for templates

bolFullPath = optional - if true, then strDir above is NOT relative

strOutPutDoc = optional - this sets the name of the output document

(if not set, then when user saves the word doc,
then they will be prompted for the file name - this is the usual default
behavior)
strSql = optional - this can be any sql/query to provide
the data for the merge in place of the "one" current form.

bolPrint = optional - if set true, then the document is printed, and
THEN CLOSED. If you do not supply the strOutPutdoc, then the merged document
is closed and discarded.

strPrinter = optional - a printer string to send the print to. This
printer string does NOT change the currnet default printer. If left blank,
then the current default printer is used


so, if you set bolprint false in the above, you can create the resulting
merge doucment, but not print.


Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleasenoSpam_kallal (AT) msn (DOT) com

Reply With Quote
  #6  
Old   
sparks
 
Posts: n/a

Default Re: couple of questions on mail merge - 08-02-2010 , 09:58 AM



I guess I just don't grasp this.

Call MergeNoPrompts("AnswerSheet", , , "pulaski " & Month(Now) & "-" &
Day(Now) & "-" & Year(Now) & ".doc", "qrypulaski", False)


Answersheet is the word document

output file
"pulaski " & Month(Now) & "-" & Day(Now) & "-" & Year(Now) & ".doc"

query that I am getting the record list from
"qrypulaski


the merge.888 file looks fine.

the word document opens with AnswerSheet and then the document is
closed.

No output file.
"pulaski " & Month(Now) & "-" & Day(Now) & "-" & Year(Now) & ".doc"


what we need is the full word document like we get from the regular
merge but not to print it out now.
There will be over 1000 letters in each batch.
I would give them the file and then they can print whatever.
page 1-150 to get the first 150 letters.

but I am not getting a word document saved.





On Fri, 30 Jul 2010 14:59:35 -0600, "Albert D. Kallal"
<PleaseNOOOsPAMmkallal (AT) msn (DOT) com> wrote:

Quote:
sparks" <sparks (AT) home (DOT) com> wrote in message
news:c11356la3ic2m1a2s06djbsb7luuflceqd (AT) 4ax (DOT) com...

my questions

How do I limit it to the first 100?

You have to some means to build a sql query that limits this to the 100
records.

strSql = "select * from tblCustomer where invoice <= '12764'"

Or, perhaps you write code that finds the 100's record, company name
and then go like:

strSql = "select * from tblCustomer where CompanyName <= 'some name'" & _
" ordery by CompanyName"

MergeAllWord strSql

I suppose you could consider modifying the output code in my merge to
limit the records sent out to the merge file. I should consider adding this
as a feature. However, some approach like the above in the meantime
would likely be less coding.


How do I only print out to the file without the printer?

You mean create the merge document, save it, but not print?

MergeNoPrompts should let you do this:

MergeNoPrompts
strFromDocTemplate,[strDir],[bolFullPath],[strOutPutDoc],[strSql],[bolPrint],[strPrinter]

strFromDoc = name of template to merge from

strDir = optional - directory to use for templates

bolFullPath = optional - if true, then strDir above is NOT relative

strOutPutDoc = optional - this sets the name of the output document

(if not set, then when user saves the word doc,
then they will be prompted for the file name - this is the usual default
behavior)
strSql = optional - this can be any sql/query to provide
the data for the merge in place of the "one" current form.

bolPrint = optional - if set true, then the document is printed, and
THEN CLOSED. If you do not supply the strOutPutdoc, then the merged document
is closed and discarded.

strPrinter = optional - a printer string to send the print to. This
printer string does NOT change the currnet default printer. If left blank,
then the current default printer is used


so, if you set bolprint false in the above, you can create the resulting
merge doucment, but not print.


Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleasenoSpam_kallal (AT) msn (DOT) com

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.