Selected text to Email

L

livetohike

Word 2000
I would like to have selected text automatically pop up in a new email
ready to be addressed and sent.

Why do I want this:
I keep a lot of canned emails in a single word document, and currently
have to select, copy, open new email, then paste text into email. It
would be really nice to do this in one click.

I know I could use email templates or other fancy solutions, but I
edit the original text often and like to keep it in once place. The
above explanation would do just fine.


Related:
When I paste the above text into an HTML email, it retains the
original (MS Word) format as expected. When I select the Normal style
from the email style menu, nothing happens. I need to first select
some other style (e.g. Header 3), then select Normal. Why?

Many Thanks.
 
G

Graham Mayor

If you add the Outlook Object library to Word's vba editor (tools >
references) the following will copy the selected text to a newOutlook mail
message - http://www.gmayor.com/installing_macro.htm . Otherwise your best
bet is to use autotext to save your standard messages.

Sub Send_As_Mail()
' send the document as an Outlook Email message
Dim bStarted As Boolean
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem
Dim sText As String

On Error Resume Next

'Prompt the user to save the document
Selection.copy
sText = Selection.Range

'Get Outlook if it's running
Set oOutlookApp = GetObject(, "Outlook.Application")

'Outlook wasn't running, start it from code
If Err <> 0 Then
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If

'Create a new mailitem
Set oItem = oOutlookApp.CreateItem(olMailItem)

With oItem
.Body = sText 'insert the selected text in the message
.Display 'display the message for processing
End With

'Clean up
Set oItem = Nothing
Set oOutlookApp = Nothing
End Sub

http://www.gmayor.com/installing_macro.htm


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top