B
ben
If I create a document with pictures/graphs, etc.. and click on the e-mail
button, and then fill in "send", "subject" and hit send it will send the
e-mail formatted as HTML with all the pictures included in the document.
However if I use the following code (taken from word.mpvs.org) to do so:
Dim bStarted As Boolean
Dim oOutlookApp As Object
Dim oItem As Object
'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(0)
With oItem
'Set the recipient for the new email
.To = "(e-mail address removed)"
'Set the recipient for a copy
'Set the subject
.Subject = "Tux-Test"
'The content of the document is used as the body for the email
.Body = ActiveDocument.Content
.Send
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
This sends as PLAIN TEXT and plain text only, all images/graphs are removed.
Is there no way I can send it as HTML W/O making it an attachment. That would
defeat the entire purpose of creating this. (Essentially a newsletter for
customers.)
button, and then fill in "send", "subject" and hit send it will send the
e-mail formatted as HTML with all the pictures included in the document.
However if I use the following code (taken from word.mpvs.org) to do so:
Dim bStarted As Boolean
Dim oOutlookApp As Object
Dim oItem As Object
'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(0)
With oItem
'Set the recipient for the new email
.To = "(e-mail address removed)"
'Set the recipient for a copy
'Set the subject
.Subject = "Tux-Test"
'The content of the document is used as the body for the email
.Body = ActiveDocument.Content
.Send
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
This sends as PLAIN TEXT and plain text only, all images/graphs are removed.
Is there no way I can send it as HTML W/O making it an attachment. That would
defeat the entire purpose of creating this. (Essentially a newsletter for
customers.)