A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - General Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

keystroke for sending mail...



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 28th 06, 10:46 PM posted to microsoft.public.outlook
Mark
external usenet poster
 
Posts: 1
Default keystroke for sending mail...

I'm a recent migrant from Thunderbird (company imposed)

After opening up a contact window, I want a simple keystroke (like
ctrl-m) to send mail to that contact.

It looks like my only options now are alt-a-m (alt, actions, mail) or
moving my hand to the mouse to click on the new message button.

I thought I could record a macro and assign it to a keystroke but it
appears that Outlook does not have a Macro record function.

Any suggestions?

TIA,
Mark
Ads
  #2  
Old October 29th 06, 01:18 AM posted to microsoft.public.outlook
Darren
external usenet poster
 
Posts: 12
Default keystroke for sending mail...

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

  #3  
Old October 29th 06, 05:39 PM posted to microsoft.public.outlook
Mark
external usenet poster
 
Posts: 4
Default keystroke for sending mail...

Darren, thanks so much for saving me from coming up the vba learning
curve...

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



  #4  
Old October 29th 06, 07:33 PM posted to microsoft.public.outlook
Mark
external usenet poster
 
Posts: 4
Default keystroke for sending mail...

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



  #5  
Old October 29th 06, 08:08 PM posted to microsoft.public.outlook
Diane Poremsky [MVP]
external usenet poster
 
Posts: 12,991
Default keystroke for sending mail...

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





  #6  
Old October 29th 06, 09:19 PM posted to microsoft.public.outlook
Mark
external usenet poster
 
Posts: 4
Default keystroke for sending mail...

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







  #7  
Old October 30th 06, 05: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









  #8  
Old October 30th 06, 05:20 PM posted to microsoft.public.outlook
Darren
external usenet poster
 
Posts: 12
Default keystroke for sending mail...

Review the following code using Redemptino. In addition, creating your
own certificate.

Sub Sendmailtest()

' 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 portino of macro was created to obtain the email address from
the open contact
' ------------------------------------------------------------------

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

' Use redemption library to create safe mailitem
Dim SafeContact, oContact
Set SafeContact = CreateObject("Redemption.SafeContactItem") 'Create an
instance of Redemption.SafeContactItem
'Set oContact = Application.Session.GetDefaultFolder(10).Items(1) 'Get
a contact item from Outlook, can be any other contact
SafeContact.Item = myItem 'set Item property of a SafeContact to an
Outlook contact item
'SafeContact.Item = oContact 'set Item property of a SafeContact to an
Outlook contact item

If SafeContact.Email1Address "" Then
strContactInfo = SafeContact.Email1Address 'access Email1Address
property from SafeContact, no warnings are displayed
'MsgBox SafeContact.Email1Address
End If

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

Dim SafeItem, oItem
Set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an
instance of Redemption.SafeMailItem
Set oItem = Application.CreateItem(0) 'Create a new message
SafeItem.Item = oItem 'set Item property
SafeItem.Recipients.Add (strContactInfo)
'SafeItem.Body = "Test Body"
SafeItem.Subject = "Test Subject"
SafeItem.Display

Endlable:
Set myNameSpace = Nothing
Set myFolder = Nothing
Set myItem = Nothing
Set SafeItem = Nothing
Set SafeContact = Nothing

End Sub

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sending mail Sean Doyle Outlook Express 3 October 6th 06 12:53 PM
keystroke or shortcut to "finalizing" the entry of a calender even calender help Outlook - Calandaring 0 September 12th 06 06:53 PM
O2k3: single keystroke to move a message(s) to a pre-determined folder(s). Michael March Outlook - General Queries 1 August 6th 06 07:44 PM
sending mail Monica Squires Outlook - General Queries 5 May 7th 06 04:03 PM
keeps sending same e-mail Rie Rie Outlook - General Queries 3 March 21st 06 07:14 PM


All times are GMT +1. The time now is 03:38 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.