I should also add Outlook Express is my DEFAULT emailer.
Seems this causes issues with objMailItem
Cheers
Rob
I found some example code on the web, however the message "user defined type
not define appears on line "oOutlookApp As Outlook.Application"
Dim bStarted As Boolean
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem
On Error Resume Next
If Len(ActiveDocument.Path) = 0 Then
MsgBox "Document needs to be saved first"
Exit Sub
End If
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If
Set oItem = oOutlookApp.CreateItem(olMailItem)
With oItem
.To = "recipient@mail.com"
.Subject = "New 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"
.Send
End With
If bStarted Then
oOutlookApp.Quit
End If
Set oItem = Nothing
Set oOutlookApp = Nothing
>I should also add Outlook Express is my DEFAULT emailer.
>
[quoted text clipped - 30 lines]
>> Cheers
>> Rob W
Graham Mayor - 09 Dec 2007 06:55 GMT
See the reply in vba beginners - and please do not multi-post.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> I found some example code on the web, however the message "user
> defined type not define appears on line "oOutlookApp As
[quoted text clipped - 70 lines]
>>> Cheers
>>> Rob W