Chart is posting at the top of the email but I want it at the bottom

daveyc18

Well-known Member
Joined
Feb 11, 2013
Messages
708
Office Version
  1. 365
  2. 2010
Set wEditor = OutApp.ActiveInspector.wordEditor

Set WSemail = Sheets("email")



On Error Resume Next
With OutMail

.To = to_list
.cc = cc_list
.Subject = "dfssdfsdfsdfsdf"

.htmlbody = StrBody & RangetoHTML(rng) & Signature
.attachments.Add fname




.Recipients.ResolveAll ' check names


WSemail.ChartObjects("mmkt_chart").Copy
wEditor.Application.Selection.Paste



.Display






End With
On Error GoTo 0
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Try replacing...

VBA Code:
wEditor.Application.Selection.Paste

with

VBA Code:
    With wEditor
        .Application.Selection.EndKey Unit:=6  '6=wdStory
        .Application.Selection.TypeParagraph
        .Application.Selection.TypeParagraph
        .Application.Selection.Paste
    End With

Hope this helps!
 
Upvote 0
Try replacing...

VBA Code:
wEditor.Application.Selection.Paste

with

VBA Code:
    With wEditor
        .Application.Selection.EndKey Unit:=6  '6=wdStory
        .Application.Selection.TypeParagraph
        .Application.Selection.TypeParagraph
        .Application.Selection.Paste
    End With

Hope this helps!

thank you!

but i didnt make it clear...it comes after the signature , but i'd like it above the signature

might not be possible...if not, good enough!
 
Upvote 0
Try the following...

VBA Code:
With OutMail
    .Display
    .To = to_list
    .CC = cc_list
    .Subject = "dfssdfsdfsdfsdf"
    .HTMLBody = StrBody & RangetoHTML(Rng)
    .Attachments.Add FName
    .Recipients.ResolveAll ' check names
    WSemail.ChartObjects("mmkt_chart").Copy
    With wEditor
        .Application.Selection.EndKey Unit:=6  '6=wdStory
        .Application.Selection.TypeParagraph
        .Application.Selection.TypeParagraph
        .Application.Selection.Paste
    End With
    .HTMLBody = .HTMLBody & Signature
End With

Hope this helps!
 
Upvote 0
Solution
Try the following...

VBA Code:
With OutMail
    .Display
    .To = to_list
    .CC = cc_list
    .Subject = "dfssdfsdfsdfsdf"
    .HTMLBody = StrBody & RangetoHTML(Rng)
    .Attachments.Add FName
    .Recipients.ResolveAll ' check names
    WSemail.ChartObjects("mmkt_chart").Copy
    With wEditor
        .Application.Selection.EndKey Unit:=6  '6=wdStory
        .Application.Selection.TypeParagraph
        .Application.Selection.TypeParagraph
        .Application.Selection.Paste
    End With
    .HTMLBody = .HTMLBody & Signature
End With

Hope this helps!
just had to add .display right above end with

worked like a charm...thank you!
 
Upvote 0

Forum statistics

Threads
1,215,300
Messages
6,124,138
Members
449,144
Latest member
Rayudo125

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top