Braech
asked on
Outlook Form VBScript Question
I am currently working on an Outlook form (message) that verifies if the user wants to add an additional recipient. This will involve us replacing the default e-mail form with a new form that queries the user when they either click the Send button (if possible) or a replacement Send button. If the user chooses yes, it should add a new recipient to the e-mail message. I'm currently using this code for the replacement button:
Sub CommandButton1_Click()
Set myNameSpace = Application.GetNameSpace(" MAPI")
Set myOlApp = CreateObject("Outlook.Appl ication")
Set myItem = myOlApp.ActiveInspector.Cu rrentItem
MsgBox "", vbYesNo ,"Send a Copy to EDC?"
if vbYesNo = Yes Then Set myRecipients = myItem.Recipients.Add("Ele ctronic Document Control")
Send
End Sub
My Visual Basic experience is limited, and the online references I've found to the Outlook controls are very limited. Any recommendations or code snippets from any VB or Outlook programmers out there? I feel like I'm this || close, but I could be completely off here. Thanks for your help.
Garth
Sub CommandButton1_Click()
Set myNameSpace = Application.GetNameSpace("
Set myOlApp = CreateObject("Outlook.Appl
Set myItem = myOlApp.ActiveInspector.Cu
MsgBox "", vbYesNo ,"Send a Copy to EDC?"
if vbYesNo = Yes Then Set myRecipients = myItem.Recipients.Add("Ele
Send
End Sub
My Visual Basic experience is limited, and the online references I've found to the Outlook controls are very limited. Any recommendations or code snippets from any VB or Outlook programmers out there? I feel like I'm this || close, but I could be completely off here. Thanks for your help.
Garth
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Garth