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

>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
>