M
matt
Hello all,
So I have a macro in Word 2003 that takes the ActiveDocument and copy/pastes
it into the body of an email message in Outlook 2007. 90% of the things in
the document are things that are linked to Excel. Everything shows up fine
except for 3 graphs that are located at the bottom of the document.
When I view these charts in the body of the email the charts are blown-up to
almost 3x's their origional size in the Word doc. Can't figure out why this
would happen? I have tried going to Options/Mail Format and unchecking the
checkbox that says something like "Remove all formatting that is not
necessary to display the message", or something along those lines. But it
did'nt change a thing.
Here is the code I am using:
____________________________________________________
Private Sub SendAsBody_Click()
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")
'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)"
.Subject = InputBox("Fill-in the subject for this email:", , _
" Daily Operational Report")
ActiveDocument.Range.FormattedText.Copy
.GetInspector.WordEditor.Range.Paste
.Display
End With
'Clean up
Set oItem = Nothing
Set oOutlookApp = Nothing
End Sub
_______________________________________________________
So I have a macro in Word 2003 that takes the ActiveDocument and copy/pastes
it into the body of an email message in Outlook 2007. 90% of the things in
the document are things that are linked to Excel. Everything shows up fine
except for 3 graphs that are located at the bottom of the document.
When I view these charts in the body of the email the charts are blown-up to
almost 3x's their origional size in the Word doc. Can't figure out why this
would happen? I have tried going to Options/Mail Format and unchecking the
checkbox that says something like "Remove all formatting that is not
necessary to display the message", or something along those lines. But it
did'nt change a thing.
Here is the code I am using:
____________________________________________________
Private Sub SendAsBody_Click()
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")
'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)"
.Subject = InputBox("Fill-in the subject for this email:", , _
" Daily Operational Report")
ActiveDocument.Range.FormattedText.Copy
.GetInspector.WordEditor.Range.Paste
.Display
End With
'Clean up
Set oItem = Nothing
Set oOutlookApp = Nothing
End Sub
_______________________________________________________