View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Send as attachment doesn't send e-mail

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 = "
'Set the recipient for a copy
'.BCC = "
'.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
Word MVP web site http://word.mvps.org



Kim K wrote:
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?