print documents

K

kevcar40

hi
i have posted here because the other group not moved since this
morning

i have a table that contains file paths to documents
table
fldrecordindex
fldpath

i have a query that returns the records relating to the open report.
what i would like to do is print the documents that are returned


ie report number 205
the query returns 3 results
doc 1
doc 2
doc 3


i would like to print these documents


any ideas how i can do this please


thanks


kevin
 
J

Jeff Boyce

Kevin

If you already posted in another newsgroup and haven't seen any response
yet, be aware:

* folks here are volunteers
* nobody may have had time
* nobody may know how

If your need is urgent, you might need to seek paid help in a different
venue...

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
K

kevcar40

Kevin

If you already posted in another newsgroup and haven't seen any response
yet, be aware:

  * folks here are volunteers
  * nobody may have had time
  * nobody may know how

If your need is urgent, you might need to seek paid help in a different
venue...

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.











- Show quoted text -

i understand that
i thought maybe there was a problem
sorry if i offended
 
S

Steve

Kevin,

Open Word, turn on the Macro recorder and get the basic code it takes to
print a document.

In Access, you need to create Word automation code to print the documents.
In the automation code you need to create a recordset from the query results
to get the names of the documents you want to print. Your code should
iterate through the names of the document and at each document use the code
you got from the Macro recorder to print the document.

Try www.mvps.org/access. You probably will get something useful there. If
you are truly stuck, contact me - I can help you. I provide help with
Access, Excel and Word applications for a reasonable fee.

Steve
(e-mail address removed)
 
J

John... Visio MVP

Steve said:
If you are truly stuck, contact me - I can help you. I provide help with
Access, Excel and Word applications for a reasonable fee.

Steve




Stevie is our own personal pet troll who is the only one who does not
understand the concept of FREE peer to peer support!
He offers questionable results at unreasonable prices.

These newsgroups are provided by Microsoft for FREE peer to peer support.
There are many highly qualified individuals who gladly help for free. Stevie
is not one of them, but he is the only one who just does not get the idea of
"FREE" support. He offers questionable results at unreasonable prices. If he
was any good, the "thousands" of people he claims to have helped would be
flooding him with work, but there appears to be a continuous drought and he
needs to constantly grovel for work.

Please do not feed the trolls.

John... Visio MVP
 
A

Arvin Meyer [MVP]

Kevin,

Printing documents outside of Access requires accessing their print
capabilities. For Office documents, that's possible by using the object
model of the program that you want to print from. For instance my code at:

http://www.datastrat.com/Code/WordMerge.txt

shows how to open a Word template, fill it with data from the current form,
then print it. Similar code can open an existing document and print it.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access

Kevin

If you already posted in another newsgroup and haven't seen any response
yet, be aware:

* folks here are volunteers
* nobody may have had time
* nobody may know how

If your need is urgent, you might need to seek paid help in a different
venue...

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.











- Show quoted text -

i understand that
i thought maybe there was a problem
sorry if i offended
 
M

Marco Pagliero

i understand that
i thought maybe there was a problem
sorry if i offended- Zitierten Text ausblenden -
You're welcome.
You might want to try this:

sub PrintDocAndQuit(DocPath as string)
aX = """"
Shell aX & "D:\programme\office97\Office\WINWORD.EXE" & aX & " " & aX
& DocPath & aX + " /q /n /mFilePrintDefault /mFileExit"
end sub

You have to loop through the results of your query and to load DocPath
with the paths of "doc1", "doc2" and so on. The path of Winword you
have to adapt to the real situation and aX is Quote, only needed if in
the paths there are blanks but which is mostly the case.
If printing takes too long you get a message "Word is printing, if you
quit now printing will be aborted" or so. Just wait (except when the
printer is not ready).
 
R

Risse

Marco Pagliero said:
You're welcome.
You might want to try this:

sub PrintDocAndQuit(DocPath as string)
aX = """"
Shell aX & "D:\programme\office97\Office\WINWORD.EXE" & aX & " " & aX
& DocPath & aX + " /q /n /mFilePrintDefault /mFileExit"
end sub

You have to loop through the results of your query and to load DocPath
with the paths of "doc1", "doc2" and so on. The path of Winword you
have to adapt to the real situation and aX is Quote, only needed if in
the paths there are blanks but which is mostly the case.
If printing takes too long you get a message "Word is printing, if you
quit now printing will be aborted" or so. Just wait (except when the
printer is not ready).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top