Send as attachment doesn't send e-mail

K

Kim K

In Word 2007, when sending a document as an attachment, the e-mail does not
send when I click "send". I have to go to the Outlook and click 'send and
receive' to get it to go. Then, the e-mail message doesn't close after it's
sent; I have to right-click on the message on the toolbar and close it that
way. The document I was sending was saved as a Word 97-2000 document (the
recipient doesn't have the 2007 version of Word). Does that have something
to do with it?
 
G

Graham Mayor

The recipient has nothing to do with it.
Whether messages are sent instantly or saved in the outbox is a setting in
Outlook's options.
As for the message remaining on screen, that appears to happen here too, so
may be 'by design'. You can get around it by using the following macro
instead. I have marked out some of the common options which you can restore
if you need them.

Sub Send_As_Mail_Attachment()

' send the document as an attachment _
in an Outlook Email message

Dim bStarted As Boolean
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem

On Error Resume Next
'Prompt the user to save the document
ActiveDocument.Save
'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
'.To = "(e-mail address removed)"
'Set the recipient for a copy
'.BCC = "(e-mail address removed)"
'.Subject = "This is the subject"
'Add the document as an attachment, you can use the _
.displayname property
'to set the description that's used in the message
.Attachments.Add Source:=ActiveDocument.FullName, _
Type:=olByValue, DisplayName:="Document as attachment"
.Display
End With

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

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

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

My web site www.gmayor.com

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

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