View Single Post
  #7  
Old October 30th 06, 06:17 PM posted to microsoft.public.outlook
Mark
external usenet poster
 
Posts: 4
Default keystroke for sending mail...

Wow, way more complicated than I have time for...

Thanks for the pointer however.
Mark


"Mark" wrote in message
...
2003. No but I will now. Thanks,
Mark

"Diane Poremsky [MVP]" wrote in message
...
that's outlook's security. which version of outlook? have you checked
outlookcode.com for methods to avoid the prompts?

--
Diane Poremsky [MVP - Outlook]
Author, Teach Yourself Outlook 2003 in 24 Hours
Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide)
Need Help with Common Tasks? http://www.outlook-tips.net/beginner/
Outlook 2007: http://www.slipstick.com/outlook/ol2007/

Outlook Tips: http://www.outlook-tips.net/
Outlook & Exchange Solutions Center: http://www.slipstick.com
Subscribe to Exchange Messaging Outlook newsletter:



"Mark" wrote in message
...
But it gets more complicated,
After getting the macro to work, I get a message that says a program is
trying to access "your email addresse" allow for then I'm given a combo
box 1 min, 2 min, 3 min etc...
requiring more keystrokes...

argggh


Mark

"Darren" wrote in message
ups.com...
Click on tools, macor, and then Visual Basic Editor

Create a new Module. You can keep the default name of Module1, but I
recommed you change it. Do not name the module the same name as the
sub.

Post the following code to your macro.

Sub Sendmailthiscontact()

' This macro will send an email to an open contact
On Error GoTo Endlable
Dim ns As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
Dim Item As Object
Dim strContactInfo As String
Dim dataObject As MSForms.dataObject

' ------------------------------------------------------------------
' This portion of macro was created to obtain the email address from
the open contact
' If you do not have an opend contact, the macro will fail.
' ------------------------------------------------------------------

Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.ActiveInspector.CurrentItem

If myItem.Email1Address "" Then
strContactInfo = myItem.Email1Address
End If

' ------------------------------------------------------------------
' This portion of macro opens a new mail item
' ------------------------------------------------------------------

Set myItem2 = myOlApp.CreateItem(olMailItem)
Set myRecipient = myItem2.Recipients.Add(strContactInfo)
myItem2.Display

Endlable:
Set myNameSpace = Nothing
Set myFolder = Nothing
Set myItem = Nothing
Set myItem2 = Nothing

End Sub









Ads