VBA
Outlook users:
Public Sub SendMail(iv_user_id_hr As String) Dim appOutlook As New Outlook.Application Dim objMailtemplate As Outlook.MailItem Dim objMail As Outlook.MailItem Set objMailtemplate = GetCurrentOutlookMail() Set objMail = appOutlook.CreateItem(olMailItem) With objMail .To = iv_user_id_hr .Recipients.ResolveAll .CC = "" .BCC = "" .Subject = objMailtemplate.Subject .Body = objMailtemplate.Body .BodyFormat = objMailtemplate.BodyFormat .HTMLBody = objMailtemplate.HTMLBody .Importance = objMailtemplate.Importance .ReminderSet = objMailtemplate.ReminderSet .ReminderTime = objMailtemplate.ReminderTime .VotingOptions = objMailtemplate.VotingOptions .VotingResponse = objMailtemplate.VotingResponse If frm_mailing_wizard.chk_do_not_send = False Then .Send Else .Display End If End WithEnd Sub
------------
via URL:
Public Declare Function ShellExecute Lib "shell32.dll" _ Alias "ShellExecuteA" (ByVal hwnd As Long, _ ByVal lpOperation As String, ByVal lpFile As String, _ ByVal lpParameters As String, ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long
Public Sub OpenURL(url As String, Optional ByVal ShowMode As OpenUrlShowConstants = swNormal) ShellExecute GetDesktopWindow(), "Open", url, "", "", ShowModeEnd Sub
...
If lv_url <> "" Then OpenURL (lv_url) End If...
for lv_url use this syntax:
lv_url = 'mailto:' && lv_address_to && '&subject=' && iv_subject && '&body=' && lv_body
The search for people who can answer your question continues for as long as needed - until you find the answer you were looking for.
When an answer is posted by someone who was invited (byYedda or by yourself) to answer your question, their answer is marked with a yellow "invited by Yedda".
To be invited to answer other people's questions in your areas of knowledge and interest, be sure to list your favorite topics:
» My Settings My Topics.
Of course, the more helpful your answers are, the more likely you are to be invited to future questions...