email subject

  • Thread starter Serginho do Teclado
  • Start date
S

Serginho do Teclado

Is there a way to change that default when sending from Word 2007?

The default email subject created when sending a document from Word
2007 is
the file name. For some reason Word 2007 doesn't recognize the
subject from
file properties. Is this a bug? Can it be fixed?
 
G

Graham Mayor

It is by design.

If you are using Outlook as your e-mail application, you could use a macro
to set the subject as whatever you want eg

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 blind copy
' .BCC = "(e-mail address removed)"
.Subject = ActiveDocument.BuiltInDocumentProperties(wdPropertyTitle)
'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