Send email from form with subject line and marked as high priority

insanemom

Registered User.
Local time
Today, 03:56
Joined
Sep 12, 2012
Messages
25
I need a button in a form that will send an email marked as high priority with predefined text in the subject field. I put an email hyperlink in the form with the subject line, but now I've been asked to have the email marked as "high priority". The hyperlink thing was simple but I think I need to use code to mark it as high priority and unfortunately I don't know code. :confused: Can someone please help me?
 
If you have a command button, it would work like this:

Private Sub Command42_Click()
On Error GoTo Errhandler
DoCmd.SendObject _
, _
, _
, _
‘Email address
"John.Doe@live.com", _
, _
, _
‘Subjectline
" Good Afternoon", _
‘Body of email
"Mr. Doe", _
True
Errhandler:
Select Case Err
Case 2501
MsgBox "Your email has not been sent", vbOKOnly, "Alert"
Resume Next

End Select
End Sub


As far as the high priorty, let me research some more.
 
jdraw, thank you for the response. I just inserted a hyperlink in the form, then I select "email address" after clicking the ... at the end of the hyperlink field in the properties box. It automatically inserts the code directly into the field mailto:jdoe@deadman.com?subject=An%20AFE%20has%20been%20submitted%20for%20your%20approval.
 
steve21nj, thank you for the code and hope you can find something on the priority. I've googled trying several descriptions but am just getting code to set the email and subject line....nothing yet on priority. I'll try the link jdraw sent also.
 
Actually the DoCmd.SendObject will not work for priority. Try this instead, it has the priority handle in there. I put as an attachment for word docx to edit.
 

Attachments

Depending on the code you are using, if you are setting an object as Outlook.Object you can use the olImportance parameter. Search my threads and you will find an outlook example that will do this. Post any questions here :)

N


Sent from my OMNIA7 using Board Express
 
Nigel, Many of us don't have 2007 or 2010 and can use accdb.
Do you have a version in mdb format?
 
From an Outlook 2000 vba manual

mailItem.Importance is the Importance property.

constants are
olImportanceLow value 0
olImportanceNormal value 1
olImportanceHigh value 2

Hope it's useful
 

Users who are viewing this thread

Back
Top Bottom