dbTalk Databases Forums  

DoCmd.SendObject asSendReport as PDF or Snapshot 2003 vs 2010

comp.databases.ms-access comp.databases.ms-access


Discuss DoCmd.SendObject asSendReport as PDF or Snapshot 2003 vs 2010 in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Barry Edmund Wright
 
Posts: n/a

Default DoCmd.SendObject asSendReport as PDF or Snapshot 2003 vs 2010 - 05-20-2011 , 11:17 AM






Hi,

Does someone have a workaround for the issue below.

I want to email a report as a Snapshot if the user has MSAccess 2000,
2002 or 2003 or a PDF if user has 2007 or 2010. I'm using the code
below. The code does not run (nor does it compile) using 2003 because
of the acFormatPDF.

'If MSAccess Version 2000, 2002 or 2003 then attach as Snapshot else
2007 or greater then attach as PDF
If Left(GetAccessVersion, 2) = "9." Or _
Left(GetAccessVersion, 2) = "10" Or _
Left(GetAccessVersion, 2) = "11" Then 'Snapshot format
DoCmd.SendObject acSendReport, "rptAcknowledged", acFormatSNP, rs!
strEmail, vCCEmailAddress, , "Procedure Acknowledgement Requested for
Lawyer: " & rs!strName, "The attached report shows you which
Procedures you have been requested to acknowledge. Please open the
Case Procedures form and click the ""Ack."" checkbox for each one not
already acknowledged.", False
Else 'acFormatPDF
DoCmd.SendObject acSendReport, "rptAcknowledged", acFormatPDF, rs!
strEmail, vCCEmailAddress, , "Procedure Acknowledgement Requested for
Lawyer: " & rs!strName, "The attached report shows you which
Procedures you have been requested to acknowledge. Please open the
Case Procedures form and click the ""Ack."" checkbox for each one not
already acknowledged.", False
End If

Thanks,
Barry

Reply With Quote
  #2  
Old   
ron paii
 
Posts: n/a

Default Re: DoCmd.SendObject asSendReport as PDF or Snapshot 2003 vs 2010 - 05-20-2011 , 03:43 PM






In the immediate window or A2007 or A2010 type
?acFormatPDF

replace acFormatPDF with the integer value from the immediate window.

"Barry Edmund Wright" <barry.edmund.wright (AT) witstoronto (DOT) ca> wrote

Quote:
Hi,

Does someone have a workaround for the issue below.

I want to email a report as a Snapshot if the user has MSAccess 2000,
2002 or 2003 or a PDF if user has 2007 or 2010. I'm using the code
below. The code does not run (nor does it compile) using 2003 because
of the acFormatPDF.

'If MSAccess Version 2000, 2002 or 2003 then attach as Snapshot else
2007 or greater then attach as PDF
If Left(GetAccessVersion, 2) = "9." Or _
Left(GetAccessVersion, 2) = "10" Or _
Left(GetAccessVersion, 2) = "11" Then 'Snapshot format
DoCmd.SendObject acSendReport, "rptAcknowledged", acFormatSNP, rs!
strEmail, vCCEmailAddress, , "Procedure Acknowledgement Requested for
Lawyer: " & rs!strName, "The attached report shows you which
Procedures you have been requested to acknowledge. Please open the
Case Procedures form and click the ""Ack."" checkbox for each one not
already acknowledged.", False
Else 'acFormatPDF
DoCmd.SendObject acSendReport, "rptAcknowledged", acFormatPDF, rs!
strEmail, vCCEmailAddress, , "Procedure Acknowledgement Requested for
Lawyer: " & rs!strName, "The attached report shows you which
Procedures you have been requested to acknowledge. Please open the
Case Procedures form and click the ""Ack."" checkbox for each one not
already acknowledged.", False
End If

Thanks,
Barry

Reply With Quote
  #3  
Old   
Barry Edmund Wright
 
Posts: n/a

Default Re: DoCmd.SendObject asSendReport as PDF or Snapshot 2003 vs 2010 - 05-20-2011 , 04:39 PM



Thanks for the reply but all I get in A2007 or A2010 is:
?acFormatPDF
PDF Format (*.pdf)

Am I missing something?

On May 20, 4:43*pm, "ron paii" <n... (AT) nospam (DOT) com> wrote:
Quote:
In the immediate window or A2007 or A2010 type
?acFormatPDF

replace acFormatPDF with the integer value from the immediate window.

"Barry Edmund Wright" <barry.edmund.wri... (AT) witstoronto (DOT) ca> wrote in messagenews:aa49e81a-482e-486e-8970-6d700d3c3349 (AT) h7g2000yqa (DOT) googlegroups.com...







Hi,

Does someone have a workaround for the issue below.

I want to email a report as a Snapshot if the user has MSAccess 2000,
2002 or 2003 or a PDF if user has 2007 or 2010. I'm using the code
below. The code does not run (nor does it compile) using 2003 because
of the acFormatPDF.

'If MSAccess Version 2000, 2002 or 2003 then attach as Snapshot else
2007 or greater then attach as PDF
If Left(GetAccessVersion, 2) = "9." Or _
* Left(GetAccessVersion, 2) = "10" Or _
* Left(GetAccessVersion, 2) = "11" Then 'Snapshot format
*DoCmd.SendObject acSendReport, "rptAcknowledged", acFormatSNP, rs!
strEmail, vCCEmailAddress, , "Procedure Acknowledgement Requested for
Lawyer: " & rs!strName, "The attached report shows you which
Procedures you have been requested to acknowledge. Please open the
Case Procedures form and click the ""Ack."" checkbox for each one not
already acknowledged.", False
Else 'acFormatPDF
*DoCmd.SendObject acSendReport, "rptAcknowledged", acFormatPDF, rs!
strEmail, vCCEmailAddress, , "Procedure Acknowledgement Requested for
Lawyer: " & rs!strName, "The attached report shows you which
Procedures you have been requested to acknowledge. Please open the
Case Procedures form and click the ""Ack."" checkbox for each one not
already acknowledged.", False
End If

Thanks,
Barry

Reply With Quote
  #4  
Old   
Barry Edmund Wright
 
Posts: n/a

Default Re: DoCmd.SendObject asSendReport as PDF or Snapshot 2003 vs 2010 - 05-20-2011 , 08:25 PM



Thanks Ron this does work:
?acFormatPDF
returned:
PDF Format (*pdf)

I then substituted "PDF Format (*pdf)" for acFormatPDF in the code
below:
Below is all one continuous line
DoCmd.SendObject acSendReport, "rptAcknowledged", "PDF Format (*pdf)",
rs!
strEmail, vCCEmailAddress, , "Procedure Acknowledgement Requested for
Lawyer: " & rs!strName, "The attached report shows you which
Procedures you have been requested to acknowledge. Please open the
Case Procedures form and click the ""Ack."" checkbox for each one not
already acknowledged.", False


On May 20, 4:43*pm, "ron paii" <n... (AT) nospam (DOT) com> wrote:
Quote:
In the immediate window or A2007 or A2010 type
?acFormatPDF

replace acFormatPDF with the integer value from the immediate window.

"Barry Edmund Wright" <barry.edmund.wri... (AT) witstoronto (DOT) ca> wrote in messagenews:aa49e81a-482e-486e-8970-6d700d3c3349 (AT) h7g2000yqa (DOT) googlegroups.com...







Hi,

Does someone have a workaround for the issue below.

I want to email a report as a Snapshot if the user has MSAccess 2000,
2002 or 2003 or a PDF if user has 2007 or 2010. I'm using the code
below. The code does not run (nor does it compile) using 2003 because
of the acFormatPDF.

'If MSAccess Version 2000, 2002 or 2003 then attach as Snapshot else
2007 or greater then attach as PDF
If Left(GetAccessVersion, 2) = "9." Or _
* Left(GetAccessVersion, 2) = "10" Or _
* Left(GetAccessVersion, 2) = "11" Then 'Snapshot format
*DoCmd.SendObject acSendReport, "rptAcknowledged", acFormatSNP, rs!
strEmail, vCCEmailAddress, , "Procedure Acknowledgement Requested for
Lawyer: " & rs!strName, "The attached report shows you which
Procedures you have been requested to acknowledge. Please open the
Case Procedures form and click the ""Ack."" checkbox for each one not
already acknowledged.", False
Else 'acFormatPDF
*DoCmd.SendObject acSendReport, "rptAcknowledged", acFormatPDF, rs!
strEmail, vCCEmailAddress, , "Procedure Acknowledgement Requested for
Lawyer: " & rs!strName, "The attached report shows you which
Procedures you have been requested to acknowledge. Please open the
Case Procedures form and click the ""Ack."" checkbox for each one not
already acknowledged.", False
End If

Thanks,
Barry

Reply With Quote
  #5  
Old   
ron paii
 
Posts: n/a

Default Re: DoCmd.SendObject asSendReport as PDF or Snapshot 2003 vs 2010 - 05-23-2011 , 07:12 AM



Glad it worked.

Those ac constants normally map to an integer.

"Barry Edmund Wright" <barry.edmund.wright (AT) witstoronto (DOT) ca> wrote

Quote:
Thanks Ron this does work:
?acFormatPDF
returned:
PDF Format (*pdf)

I then substituted "PDF Format (*pdf)" for acFormatPDF in the code
below:
Below is all one continuous line
DoCmd.SendObject acSendReport, "rptAcknowledged", "PDF Format (*pdf)",
rs!
strEmail, vCCEmailAddress, , "Procedure Acknowledgement Requested for
Lawyer: " & rs!strName, "The attached report shows you which
Procedures you have been requested to acknowledge. Please open the
Case Procedures form and click the ""Ack."" checkbox for each one not
already acknowledged.", False


On May 20, 4:43 pm, "ron paii" <n... (AT) nospam (DOT) com> wrote:
In the immediate window or A2007 or A2010 type
?acFormatPDF

replace acFormatPDF with the integer value from the immediate window.

"Barry Edmund Wright" <barry.edmund.wri... (AT) witstoronto (DOT) ca> wrote in
messagenews:aa49e81a-482e-486e-8970-6d700d3c3349 (AT) h7g2000yqa (DOT) googlegroups.com...







Hi,

Does someone have a workaround for the issue below.

I want to email a report as a Snapshot if the user has MSAccess 2000,
2002 or 2003 or a PDF if user has 2007 or 2010. I'm using the code
below. The code does not run (nor does it compile) using 2003 because
of the acFormatPDF.

'If MSAccess Version 2000, 2002 or 2003 then attach as Snapshot else
2007 or greater then attach as PDF
If Left(GetAccessVersion, 2) = "9." Or _
Left(GetAccessVersion, 2) = "10" Or _
Left(GetAccessVersion, 2) = "11" Then 'Snapshot format
DoCmd.SendObject acSendReport, "rptAcknowledged", acFormatSNP, rs!
strEmail, vCCEmailAddress, , "Procedure Acknowledgement Requested for
Lawyer: " & rs!strName, "The attached report shows you which
Procedures you have been requested to acknowledge. Please open the
Case Procedures form and click the ""Ack."" checkbox for each one not
already acknowledged.", False
Else 'acFormatPDF
DoCmd.SendObject acSendReport, "rptAcknowledged", acFormatPDF, rs!
strEmail, vCCEmailAddress, , "Procedure Acknowledgement Requested for
Lawyer: " & rs!strName, "The attached report shows you which
Procedures you have been requested to acknowledge. Please open the
Case Procedures form and click the ""Ack."" checkbox for each one not
already acknowledged.", False
End If

Thanks,
Barry

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.