Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / July 2005

Tip: Looking for answers? Try searching our database.

Sending Word doc as attachments-automatic subject line

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jackie - 12 Jul 2005 22:20 GMT
In Microsoft Office 2000 when  a word document was sent as an attachment the
subject line would automatically appear with the title I had assigned it in
the properties of the word document.
In Microsoft Office 2003, this no longer happens. The subject line no longer
takes the title of the Template the document was created from, it only takes
the document name. We have may rules set up when documents are sent that
since upgrading to Office 2003 have not been as useful. I need help in
determining how to get this subject line to automatically show up as before
when using Office 2000
Thank you,
Signature

Jackie

Peter Jamieson - 13 Jul 2005 12:37 GMT
I don't know of a simple way to work around this change (which happened in
Office 2002) - the only thing I can suggest is that you construct your own
macro. The following code is untested and is based on Astrid Zeelenberg's
example at the Word MVP site -

http://word.mvps.org/faqs/interdev/sendmailcontent.htm

It really assumes that you have just saved the current document to disk.

Sub SendDocumentInMail()

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

On Error Resume Next

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

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

With oItem
   'Set the recipient for the new email - edit this, or comment this out if
your users should enter the address
  .To = "recipient1@mail.com"
   'Set the recipient for a copy - edit this, or comment this out if your
users should enter the address
   '.CC = "recipient2@mail.com"
   'Set the subject to be the document title
   .Subject = ActiveDocument.BuiltInDocumentProperties("Title")
   'The content of the document is used as the body for the email - change
this to be whatever you want
   '.Body = ActiveDocument.Content
   .Attachments.Add Source:= _
     ActiveDocument.FullName, _
     Type:=olByValue, _
     Position:=1, _
     DisplayName:="my attachment"
   ' in this case, just display the result
   .Display
End With

If bStarted Then
   'If we started Outlook from code, then close it
   oOutlookApp.Quit
End If

'Clean up
Set oItem = Nothing
Set oOutlookApp = Nothing

End Sub

Peter Jamieson

> In Microsoft Office 2000 when  a word document was sent as an attachment
> the
[quoted text clipped - 11 lines]
> when using Office 2000
> Thank you,

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.