Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email Reports as PDFs via Groupwise?

Status
Not open for further replies.

Cleis

Technical User
Jun 4, 2000
197
US
HI Group:

Okay imagine this. I print off commission statements for about 400 folks (approximatley 800 - 900pgs)a month. Up to now I've been spending a half a day each month getting these stapled and out in the mail. Does anybody see a problem here???

Well I've used Access for some time now but have never used OLE objects before; never thought I needed them. . . little did (do) I know!

Here is my question. Can I run my commission report and save each report by Sales Rep number to a file or an ole field within an Access table? Yes!

I just don't know where to start!!! Any Ideas????

As far as groupwise and e-mailing is concerned I undertand that process; due to all of the other postings in this web-site!!! I just need a kick in the A#$ and pointed in the right direction!


As always I DO appriciate any and all help provided!!!!!!!!!


Rich
 
Rich,

Can this be done? Absolutely!

Sample code:

Code:
Private Sub cmd711OpenHTML_Click()
On Error GoTo Err_cmd711OpenHTML_Click
    Dim strFile As String, strMonth As String, strYear As String
    Dim strDate As String, strCriteria As String

    strMonth = Left(Date, (InStr(1, Date, "/") - 1))
    strDay = IIf(Len(Date) = 8, Mid(Date, 3, 1), Mid(Date, 3, 2))
    strYear = Right(Date, 4)
    
    strFile = "P:\7Eleven\Job Reports\Open Orders " & strMonth & "-" & strDay & "-" & strYear & ".html"
        
    DoCmd.OutputTo acOutputQuery, "7Eleven Open Jobs", acFormatHTML, strFile, True, , 0

Exit_cmd711OpenHTML_Click:
    Exit Sub

Err_cmd711OpenHTML_Click:
    MsgBox Err.Description
    Resume Exit_cmd711OpenHTML_Click
    
End Sub

Of course, you're going to want to modify the code to include a loop through each salesman, then filter the report based on the salesman id. More information about the OutputTo method can be found by searching VBA Help (Alt + F11, then F1; or press F1 when inside a code module) for "outputto method".

One last thing and I'll finish this novella (I promise)....You won't be able to export your report in pdf format. I use HTML format instead. It does a pretty good job with it.

If you need additional help, let me know. I'll be glad to assist in any way possible.

Good Luck!
Ami
AmiDenise@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top