I need a button on a form to print to AdobePdf printer, and give the
report the name [ProductID] pdf.
ProductID is alphanumeric and has the form AA-00A-000-00.
I can preview this report, and then rename and print it, but I want it
automatic.
Thanks for answers.
Check out the cute PDF printer utility:
http://www.cutepdf.com/Products/CutePDF/writer.asp
Also, here is a more complete listing of other possibilities:
http://www.granite.ab.ca/access/pdffiles.htm
Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
PDF Library:
http://ourworld.compuserve.com/homepages/attac-cg/acgsoft.htm
Win2PDF:
http://www.daneprairie.com
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
"Veli Izzet" <veli....@gmail.com> wrote in message
news:eFT3S4gq...@tk2msftngp13.phx.gbl...
I do not have a problem with the pdf side, I want to be able to choose
the printer to which I want to print, and I want to be able to change
the name of the document just before the printing job if I can on the
access side.
Check out this MSDN article for controlling printer settings:
This assumes that you are using Access 2002 or later. Note: You *might* be
able to retrieve a version of this article in Turkish by changing the "en-us"
portion of the URL shown above to whatever the corresponding letters would be
for Turkish. I really don't know about this for sure though.
> and I want to be able to change the name of the document just before the
> printing job ...
I've never worked with printing to PDF files, but one can programmatically
print snapshot (*.snp) files with different filenames. You do this by setting
the report caption programmatically. The snapshot file picks up the caption
as part of it's filename. Here is an example, using the Report's Activate
event procedure, to set the caption programmatically:
Private Sub Report_Activate()
On Error GoTo ProcError
' The caption is used for the Snapshot filename (caption.snp)
Me.Caption = ServiceRequested & " request for " & EquipID
ExitProc:
Exit Sub
ProcError:
MsgBox "Error: " & Err.Number & ". " & Err.Description, , _
"Error in Report_Activate event procedure..."
Resume ExitProc
End Sub
In the code shown above, ServiceRequested and EquipID are two fields that
are included in the report's recordsource.
Good Luck!
Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
"Veli Izzet" wrote:
Hi Tom,
I do not have a problem with the pdf side, I want to be able to choose
the printer to which I want to print, and I want to be able to change
the name of the document just before the printing job if I can on the
access side.
__________________________________________
I'm glad to hear that it works for you. You are confirming that a .PDF file
picks up the report caption as it's default name? I know that a snapshot
file does, but it would be nice to know that the .PDF export works in the
same manner.
I honestly don't know if this is documented anywhere. I discovered it by
trial and error a few years back, when I was creating a procedure to automate
sending snapshot files by e-mail. I noticed that if the report did not
include a caption property that my snapshot file would have a default name of
rptWhatever (I use the lowercase "rpt" as a naming convention prefix for
reports). I also noticed that when I added a caption, the default filename
became the caption. So, I just experimented with changing the caption at
run-time. It worked.
Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
"Veli Izzet" wrote:
Hi Tom,
Me.Caption worked, thanks. Just what I wanted. Where are these
documented anyway?
In my application, I printout the costs of items directly with a button
from the form after the form calculates the cost. The report is
rptWhatever, and it must take the name or ID of the product.
Now maybe, I can assign an after_update event, even to leave out the button.
I didnot check to change the printer (yet) however. For now I make the
pdf printer the default one, and the problem is solved.