View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default emailmergewithattachments on Outlook 2003 SP3

Try running the following code

Dim oOutlookApp as Outlook.Application
Dim oItem as Outlook.MailItem
Set oOutlookApp = GetObject(, "Outlook.Application")
Set oItem = oOutlook.App.CreateItem(olMailItem)
With oItem
.Subject = "Test"
.Body = ActiveDocument.Content
.PrintOut
End With
Set oItem = Nothing
Set oOutlookApp = Nothing

It should cause a "document" to be printed on the default printer with the
subject line of "Test" and the body of the message being the text of the
document that was the active document when you run the macro.

This will test whether the mail item is being created.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

wrote in message
...
Thanks -

I made the update as suggested and the msgbox does not show upon
runtime. When I step through, the msgbox value is object variable not
set.

So I guess the item is not being created?

S