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
755
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

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
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,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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