Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to paste an object in the body of an email item via automation

Status
Not open for further replies.

Dan777

Programmer
Jul 22, 2000
34
US
Does anyone know how to automatically paste the contents of the Windows Clipboard into the body of an Outlook email item?

In my app, I've got a feature that allows users to generate graphs based on some historical data they've selected. Then I've got a "Send Graph" button, that when the user clicks it, VFP will copy the graph to the windows clipboard, instantiate an Outlook mail item, paste the contents of the clipboard (the graph) into the Body of the email item, then display the email item so the users can add text or whatever. I've got everything but the actual pasting figured out (copying the graph, firing up Outlook, and creating the email item).

I just want to do something like:
loO = createobject('outlook.application')
loM = loO.createitem(0)
loM.Body.PasteSpecial()
loM.Display()

I know both Word and Excel have the PasteSpecial method, does Outlook have an equivalent, or does anyone know of a work-around?

Thanks for any and all advice!
Dan
 
You may be better off sending the graph to a file and attaching the file to the message.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top