Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default Macro to Paste Picture in email body from Clipboard

Hi all, I want macro which can paste picture in email body from
clipboard. I got macro below which works ok but I am not achiving
what I want from it. Please can any friend can help

Sub SendEmail()
Range("A1:D20").CopyPicture xlScreen, xlPicture

Dim OutApp As Object
Dim OutMail As Object
With Application
..EnableEvents = False
..ScreenUpdating = False
End With

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

On Error Resume Next

With OutMail
..To = "
'.CC = ""
'.BCC = ""
..Subject = "Testing Email"


..HTMLBody = .Paste 'Something needed here
..Display

End With
On Error GoTo 0

With Application
.EnableEvents = True
.ScreenUpdating = True
End With

Set OutMail = Nothing
Set OutApp = Nothing

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Macro to Paste Picture in email body from Clipboard

If you want a picture in your mail try this
http://www.rondebruin.nl/mail/folder3/mailenvelope.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"K" wrote in message ...
Hi all, I want macro which can paste picture in email body from
clipboard. I got macro below which works ok but I am not achiving
what I want from it. Please can any friend can help

Sub SendEmail()
Range("A1:D20").CopyPicture xlScreen, xlPicture

Dim OutApp As Object
Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

On Error Resume Next

With OutMail
.To = "
'.CC = ""
'.BCC = ""
.Subject = "Testing Email"


.HTMLBody = .Paste 'Something needed here
.Display

End With
On Error GoTo 0

With Application
.EnableEvents = True
.ScreenUpdating = True
End With

Set OutMail = Nothing
Set OutApp = Nothing

End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default Macro to Paste Picture in email body from Clipboard

On May 13, 2:53*pm, "Ron de Bruin" wrote:
If you want a picture in your mail try thishttp://www.rondebruin.nl/mail/folder3/mailenvelope.htm

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"K" wrote in ...
Hi all, I want macro which can paste picture in email body from
clipboard. *I got macro below which works ok but I am not achiving
what I want from it. *Please can any friend can help


Sub SendEmail()
Range("A1:D20").CopyPicture xlScreen, xlPicture


Dim OutApp As Object
Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With


Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)


On Error Resume Next


With OutMail
.To = "
'.CC = ""
'.BCC = ""
.Subject = "Testing Email"


.HTMLBody = .Paste *'Something needed here
.Display


End With
* *On Error GoTo 0


* *With Application
* * * *.EnableEvents = True
* * * *.ScreenUpdating = True
* *End With


* *Set OutMail = Nothing
* *Set OutApp = Nothing


End Sub- Hide quoted text -


- Show quoted text -


Hi Ron, Thanks for replying. Please note i dont want picture in
email body but i want to paste a picture in email body. Please advise
me that what kind of changes i can do in you macro to achive this.
There is no good sultion out there to get code to paste picture in
email body. its easy to put picture from a path into email body but
how can i paste something on clipboard to email body by excel macro.
Please help
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Macro to Paste Picture in email body from Clipboard

Hi K

I have no example for this for you on this moment.
Sorry I have no time on this moment to create/test a example for you


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"K" wrote in message ...
On May 13, 2:53 pm, "Ron de Bruin" wrote:
If you want a picture in your mail try thishttp://www.rondebruin.nl/mail/folder3/mailenvelope.htm

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"K" wrote in ...
Hi all, I want macro which can paste picture in email body from
clipboard. I got macro below which works ok but I am not achiving
what I want from it. Please can any friend can help


Sub SendEmail()
Range("A1:D20").CopyPicture xlScreen, xlPicture


Dim OutApp As Object
Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With


Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)


On Error Resume Next


With OutMail
.To = "
'.CC = ""
'.BCC = ""
.Subject = "Testing Email"


.HTMLBody = .Paste 'Something needed here
.Display


End With
On Error GoTo 0


With Application
.EnableEvents = True
.ScreenUpdating = True
End With


Set OutMail = Nothing
Set OutApp = Nothing


End Sub- Hide quoted text -


- Show quoted text -


Hi Ron, Thanks for replying. Please note i dont want picture in
email body but i want to paste a picture in email body. Please advise
me that what kind of changes i can do in you macro to achive this.
There is no good sultion out there to get code to paste picture in
email body. its easy to put picture from a path into email body but
how can i paste something on clipboard to email body by excel macro.
Please help
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Macro to Paste Picture in email body from Clipboard

paste doesn't work. with the picture, save it to your local drive, then
link it to the mail as suggested in Ron's reply

"Ron de Bruin" wrote in message
...
Hi K

I have no example for this for you on this moment.
Sorry I have no time on this moment to create/test a example for you


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"K" wrote in message
...
On May 13, 2:53 pm, "Ron de Bruin" wrote:
If you want a picture in your mail try
thishttp://www.rondebruin.nl/mail/folder3/mailenvelope.htm

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"K" wrote in
...
Hi all, I want macro which can paste picture in email body from
clipboard. I got macro below which works ok but I am not achiving
what I want from it. Please can any friend can help


Sub SendEmail()
Range("A1:D20").CopyPicture xlScreen, xlPicture


Dim OutApp As Object
Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With


Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)


On Error Resume Next


With OutMail
.To = "
'.CC = ""
'.BCC = ""
.Subject = "Testing Email"


.HTMLBody = .Paste 'Something needed here
.Display


End With
On Error GoTo 0


With Application
.EnableEvents = True
.ScreenUpdating = True
End With


Set OutMail = Nothing
Set OutApp = Nothing


End Sub- Hide quoted text -


- Show quoted text -


Hi Ron, Thanks for replying. Please note i dont want picture in
email body but i want to paste a picture in email body. Please advise
me that what kind of changes i can do in you macro to achive this.
There is no good sultion out there to get code to paste picture in
email body. its easy to put picture from a path into email body but
how can i paste something on clipboard to email body by excel macro.
Please help


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert picture in email body Hendrik Kleine Excel Programming 6 January 27th 09 03:19 PM
COPY/PASTE to body of email the format of Excell cell LetMeDoIt Excel Programming 2 August 4th 08 12:39 PM
Copy and paste 2 excel sheets in message body of email rrmando[_2_] Excel Programming 5 April 3rd 06 10:05 PM
How to paste cells from Excel into Outlook email body? stastim Excel Programming 2 August 23rd 04 06:35 PM
Copy and Paste a Worksheet Range to Email Body Eric[_14_] Excel Programming 1 January 20th 04 12:06 AM


All times are GMT +1. The time now is 12:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"