UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> E-mail button    
 
   
manito2000
post Dec 3 2008, 04:52 PM
Post #1

New Member
Posts: 16



Hello...

I have a DB where I'd like to include on the form 3 e-mail buttons...3 different e-mail recipients.

I'd like to be able to press the button and have my Outlook e-mail the person (assigned to each button) and pull the record number field and the due date field and put it in the Outlook subject line...

Is this possible? Or am I dreaming?

Manito2000
Go to the top of the page
 
+
johnharveyk
post Dec 3 2008, 05:07 PM
Post #2

UtterAccess Addict
Posts: 296
From: AZ



Yes. possible - I'll include some code I use which was all developed from the examples om the MSDN site. Note: you'll have to be sure that the dll's referenced are on each computer if you are distributing the app (which can be done in the wizzard with a little effort - but which I generally just copy to the appropriate drive as it's almost easier.)

stDocName = "LibbeyAddOns"
DoCmd.OpenQuery ("InventoryUpdtAddOns")
'DoCmd.OpenReport stDocName, acPreview

SendR = MsgBox("Do you wish to send this fax to the number in the Customer's file?", vbYesNo)
If SendR = 6 Then

Dim objFaxServer As New FAXCOMEXLib.FaxServer
Dim objFaxDoc As New FAXCOMEXLib.FaxDocument
Dim JobID As Variant
'DoCmd.SendObject acSendReport, "StatementsNOCMF", acFormatRTF, "[fax: " & Me.APFaxPhone & "]", , , , , 0 (Exchange Server Only)
DoCmd.OutputTo acSendReport, stDocName, acFormatRTF, "c:\TempFaxFile.RTF"
If Me.POFax <> "" Then
objFaxServer.Connect "XXXserver"
If Len(Me.POFax) = 10 Then
objFaxDoc.Recipients.Add ("1" & Me.POFax)
Else
objFaxDoc.Recipients.Add Me.POFax
End If

objFaxDoc.CoverPageType = fcptLOCAL
objFaxDoc.CoverPage = "C:\POCover.cov"
objFaxDoc.Body = "c:\TempFaxFile.rtf"
objFaxDoc.DocumentName = "XXXFax"
objFaxDoc.Priority = fptNORMAL

'objFaxDoc.ScheduleType = fstSPECIFIC_TIME
'objFaxDoc.ScheduleTime = Now() + 0.4

objFaxDoc.Subject = "Purchase Order Add ON"
objFaxDoc.Sender.City = "Tucson"
objFaxDoc.Sender.Company = "XXXX"
'objFaxDoc.Sender.EMail = [TempVars]![CurrentUserID] & "@XXXXX.com"
objFaxDoc.Sender.faxnumber = "XXXX"
objFaxDoc.Sender.OfficePhone = "XXXX"
objFaxDoc.Sender.Department = "Purchasing"

'JobID = objFaxDoc.ConnectedSubmit(objFaxServer) 'original MS code
Call objFaxDoc.ConnectedSubmit(objFaxServer)
'SendR = MsgBox(JobID, , "JobID")

objFaxServer.Disconnect


Else
MsgBox ("Fax # is Blank")
End If

Basically, you send the fax to a file, then calll the dll to fax the file. I have a server set up to fax & this scheme works just fine.

Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 18th May 2013 - 08:41 AM