W
Wi11y13
First of all I apologize if this questions shows up twice. I posted earlier
and never saw it come on line.
I need the ability to pre-populate an e-mail and automatically send it
(without user intervention) from a PowerPoint Slide Show. I also need to
utilize whatever default mail system the user has for his system. I have
actually been able to create and populate the e-mail but I can not find a way
to automatically send it without user intervention. This is the code I have
so far (with lots of internet help):
Sub SendMyEMail()
Dim emaddr As String
Dim subj As String
Dim Name As String
Dim salutation As String
Dim hlink As Variant
emaddr = "(e-mail address removed)"
subj = "Training Completion for "
ID = Environ("USERNAME")
salutation = "Completed"
'compose default parts of the message
hlink = "mailto:" & emaddr & "?"
hlink = hlink & "subject=" & subj & ID & "&"
hlink = hlink & "body=" & ID & " has completed the Training "
'open email
ActivePresentation.FollowHyperlink hlink
DoEvents
keybd_event VK_MENU, 0, 0, 0 ' set Alt
keybd_event vbKeyD, 0, 0, 0 ' set D key down
keybd_event vbKeyD, 0, KEYEVENTF_KEYUP, 0 ' set D key up
keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0 ' set left win key up
End Sub
As you can see I even tried to force it by sending an ALT-D but that did not
work. I would guess it did not work as the cpu is within the mail application
and never even sees the ALT-D until the user exits and comes back to
Powerpoint.
Anyone have an idea on how to auto send this with the followhyperlink
command? Is there some sort of parameter that can be incorporated with it?
Again I apologize if this gets double posted.
Thanks,
and never saw it come on line.
I need the ability to pre-populate an e-mail and automatically send it
(without user intervention) from a PowerPoint Slide Show. I also need to
utilize whatever default mail system the user has for his system. I have
actually been able to create and populate the e-mail but I can not find a way
to automatically send it without user intervention. This is the code I have
so far (with lots of internet help):
Sub SendMyEMail()
Dim emaddr As String
Dim subj As String
Dim Name As String
Dim salutation As String
Dim hlink As Variant
emaddr = "(e-mail address removed)"
subj = "Training Completion for "
ID = Environ("USERNAME")
salutation = "Completed"
'compose default parts of the message
hlink = "mailto:" & emaddr & "?"
hlink = hlink & "subject=" & subj & ID & "&"
hlink = hlink & "body=" & ID & " has completed the Training "
'open email
ActivePresentation.FollowHyperlink hlink
DoEvents
keybd_event VK_MENU, 0, 0, 0 ' set Alt
keybd_event vbKeyD, 0, 0, 0 ' set D key down
keybd_event vbKeyD, 0, KEYEVENTF_KEYUP, 0 ' set D key up
keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0 ' set left win key up
End Sub
As you can see I even tried to force it by sending an ALT-D but that did not
work. I would guess it did not work as the cpu is within the mail application
and never even sees the ALT-D until the user exits and comes back to
Powerpoint.
Anyone have an idea on how to auto send this with the followhyperlink
command? Is there some sort of parameter that can be incorporated with it?
Again I apologize if this gets double posted.
Thanks,