Hi dears,
I am having my code in excel and i did macro on it, all works fine and perfect and it takes right picture.
The only thing i need to increase is the size of its pic when it's pasted into outlook email.
could you please help me to adjust its size?
Sub Send_Eur_margins()
Dim header As String
Dim tolist As String
Dim ccList As String
Dim Range As String
Dim htmlBodyText As String
Dim wb As Workbook
Application.ScreenUpdating = False
Set wb = ActiveWorkbook
wb.Sheets("EMAIL").Activate
header = Sheets("EMAIL").Range("W2").Value
tolist = Sheets("EMAIL").Range("W3").Value
ccList = Sheets("EMAIL").Range("W4").Value
Rangemail1 = Sheets("EMAIL").Range("W5").Value
htmlBodyText = "<br> <br> "
Set mailApp = CreateObject("Outlook.Application")
Set mail = mailApp.CreateItem(olMailItem)
mail.Display
Set wEditor = mailApp.ActiveInspector.wordEditor
Application.DisplayAlerts = False
On Error Resume Next
With mail
.To = tolist
.CC = ccList
.Subject = header
.HTMLBody = htmlBodyText
.Display
wb.Sheets("EMAIL").Activate
'Summary tab
.HTMLBody = .HTMLBody & "<font face=""tahoma"" color = ""#1F618D""> <br> <u><b></b></u>"
wb.Sheets("EMAIL").Range("A4:R124").Select
Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
wEditor.Application.Selection.Start = Len(.HTMLBody)
wEditor.Application.Selection.End = wEditor.Application.Selection.Start
wEditor.Application.Selection.PasteAndFormat wdPasteBitmap
End With
On Error GoTo 0
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
this is my macro.
Thanks alot in advance.
I am having my code in excel and i did macro on it, all works fine and perfect and it takes right picture.
The only thing i need to increase is the size of its pic when it's pasted into outlook email.
could you please help me to adjust its size?
Sub Send_Eur_margins()
Dim header As String
Dim tolist As String
Dim ccList As String
Dim Range As String
Dim htmlBodyText As String
Dim wb As Workbook
Application.ScreenUpdating = False
Set wb = ActiveWorkbook
wb.Sheets("EMAIL").Activate
header = Sheets("EMAIL").Range("W2").Value
tolist = Sheets("EMAIL").Range("W3").Value
ccList = Sheets("EMAIL").Range("W4").Value
Rangemail1 = Sheets("EMAIL").Range("W5").Value
htmlBodyText = "<br> <br> "
Set mailApp = CreateObject("Outlook.Application")
Set mail = mailApp.CreateItem(olMailItem)
mail.Display
Set wEditor = mailApp.ActiveInspector.wordEditor
Application.DisplayAlerts = False
On Error Resume Next
With mail
.To = tolist
.CC = ccList
.Subject = header
.HTMLBody = htmlBodyText
.Display
wb.Sheets("EMAIL").Activate
'Summary tab
.HTMLBody = .HTMLBody & "<font face=""tahoma"" color = ""#1F618D""> <br> <u><b></b></u>"
wb.Sheets("EMAIL").Range("A4:R124").Select
Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
wEditor.Application.Selection.Start = Len(.HTMLBody)
wEditor.Application.Selection.End = wEditor.Application.Selection.Start
wEditor.Application.Selection.PasteAndFormat wdPasteBitmap
End With
On Error GoTo 0
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
this is my macro.
Thanks alot in advance.