Hi Frnds
Any one guide me how i can add "*.PDF format in send object format. Snapshot is below.
Code:Code:Code:
[QUOTE][/QUOTE]
Hi Frnds
Any one guide me how i can add "*.PDF format in send object format. Snapshot is below.
Code:Code:Code:
[QUOTE][/QUOTE]
"PDFFormat(*.pdf)"
If you are sending to each records one after another then do this
the DoCmd.SendObject acSendReport, , "PDFFormat(*.pdf)" will send object as PDFCode:DoCmd.OpenReport "rptYourReport", acViewPreview, DoCmd.SendObject acSendReport, , "PDFFormat(*.pdf)", Me.YourEmailField, , , , , True Docmd.CloseReport "rptYourReport"
if you are running through a recordset (advanced) then you will need to open the report first and after sending it you will need to close it to allow you to open the next records report.
if you are just putting a send report as pdf button then
DoCmd.SendObject acSendReport, , "PDFFormat(*.pdf)" will do
you can also use the button wizard to simply let it help you create a marco that will send the report as a pdf.
plz give me step by step advise where i need to past this code.
"PDFFormat(*.pdf)"
If you are sending to each records one after another then do this
the DoCmd.SendObject acSendReport, , "PDFFormat(*.pdf)" will send object as PDFCode:DoCmd.OpenReport "rptYourReport", acViewPreview, DoCmd.SendObject acSendReport, , "PDFFormat(*.pdf)", Me.YourEmailField, , , , , True Docmd.CloseReport "rptYourReport"
if you are running through a recordset (advanced) then you will need to open the report first and after sending it you will need to close it to allow you to open the next records report.
if you are just putting a send report as pdf button then
DoCmd.SendObject acSendReport, , "PDFFormat(*.pdf)" will do
you can also use the button wizard to simply let it help you create a marco that will send the report as a pdf.
ok, firstly please do not paste this code - understand it.
In order for you to have the action of send object you require something to happen - an event.
Each event causes something to occur.
In our case a on the click of a button event. An OnClick() function.
There is a properies info box that allows you to see the properties on the control of a form. A control like a button that you place on the form using the form designer.
So create a button, open that buttons properties, go to it's event "on click" if that is the event you desire and then
DoCmd.SendObject acSendReport, , "PDFFormat(*.pdf)"
and the rest is from my previous post.
the docmd.sendobject is the command
acSendReport is you telling what kind of object it is - in this case a report
and "PDFFormat(*.pdf)" is the format we want to the object sent as.Let me know if you understand.
Can you please send me screenshot of this activity. I tell you what i try.
Open form in design veiw
past a button {MAIL REPORT)
Go to properties of this button and click on {event button}
In even button i select {even procedure} and clik on ... button
a new window open then i past the given code.
when i apply it error msg # 2487 appear.
plz gudie me if i do any mistake.
ok, firstly please do not paste this code - understand it.
In order for you to have the action of send object you require something to happen - an event.
Each event causes something to occur.
In our case a on the click of a button event. An OnClick() function.
There is a properies info box that allows you to see the properties on the control of a form. A control like a button that you place on the form using the form designer.
So create a button, open that buttons properties, go to it's event "on click" if that is the event you desire and then
DoCmd.SendObject acSendReport, , "PDFFormat(*.pdf)"
and the rest is from my previous post.
the docmd.sendobject is the command
acSendReport is you telling what kind of object it is - in this case a report
and "PDFFormat(*.pdf)" is the format we want to the object sent as.Let me know if you understand.
Ok. Does the form have a set of records or is just a blank form with a button on it?Can you please send me screenshot of this activity. I tell you what i try.
Open form in design veiw
past a button {MAIL REPORT)
Go to properties of this button and click on {event button}
In even button i select {even procedure} and clik on ... button
a new window open then i past the given code.
when i apply it error msg # 2487 appear.
plz gudie me if i do any mistake.
If the form is blank, you need to use the design menu and add a button.
Because you want to customise it without using the wizard then when you add the button, you need to cancel the wizard - it will leave you with a button that does nothing.
Then select that button in design mode and click on it's properties in the properties.
My next question is - what is the name of your report? What have you named the report?
In order for the button to open the report - you need to tell the docmd.sendobject what your report is.
Plz resend me code again after adding report name as
adjustment.
I am beginner sorry for...
Regards
Ok. Does the form have a set of records or is just a blank form with a button on it?
If the form is blank, you need to use the design menu and add a button.
Because you want to customise it without using the wizard then when you add the button, you need to cancel the wizard - it will leave you with a button that does nothing.
Then select that button in design mode and click on it's properties in the properties.
My next question is - what is the name of your report? What have you named the report?
In order for the button to open the report - you need to tell the docmd.sendobject what your report is.
Correct. You don't send one format to another format.
The report I am speaking of is an access report. It is unformatted. You format it to PDF when you use sendobject
- why would you have the report in .xps already??