From: sparks on

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.



From: Albert D. Kallal on
"sparks" <sparks(a)home.com> wrote in message
news:vhgg46ttfps9as8vesr0t0jr5e6nf30hpf(a)4ax.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.


From: sparks on
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(a)msn.com> wrote:

>"sparks" <sparks(a)home.com> wrote in message
>news:vhgg46ttfps9as8vesr0t0jr5e6nf30hpf(a)4ax.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.
>
From: sparks on
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(a)home.com> wrote:

>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(a)msn.com> wrote:
>
>>"sparks" <sparks(a)home.com> wrote in message
>>news:vhgg46ttfps9as8vesr0t0jr5e6nf30hpf(a)4ax.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.
>>
From: Albert D. Kallal on
sparks" <sparks(a)home.com> wrote in message
news:c11356la3ic2m1a2s06djbsb7luuflceqd(a)4ax.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(a)msn.com