Paste into Outlook Using LotusScript

Hi all, Scratching my head a bit over this one.

I’m converting some emailing functionality so it opens and populates a memo in Outlook.

I want to paste some contents from the clipboard into the memo.

Have found various things here and on Google but it doesn’t really make any sense.

Can anyone help me as to how to paste into Outlook using script.

Sample code below …

If IsObject ( OutlookApp ) Then

Set myNameSpace = OutlookApp.GetNameSpace ( “MAPI” )

Set mymemo = OutlookApp.CreateItem ( olMailItem )

With mymemo

.Subject = “Subject”

.body = .body & “Line 1” & Chr(10)

.body = .body & “Line 2” & Chr(10)

… then paste here …

Many thanks in advance.

Andy

Subject: So you’re trying to control outlook from a browser?

If from a browser it’s only possible from IE as IE is the only one that supports OLE automation.

Lotusscript isn’t involved here, the thing that controls IE/Outlook is the code on your browser page.

Have you considered just using a mailto: link that contains the text you want?

Subject: RE: So you’re trying to control outlook from a browser?

Hi, No, I’m doing this in an agent through the client.

Currently agent creates the email uidoc and then populates some text, pastes in copied details and then adds more text.

We may be moving to Outlook in near future so I want to make sure I can mimic functionality before we get too far.

I’m assuming there must be a LS equivalent for the VB command but I can’t work it out. I usually record macros when working with Word & Excel, then convert to LS, but I can’t record macros in Outlook 2007 for some reason.

Thanks for the reply.

Andy

Subject: RE: So you’re trying to control outlook from a browser?

search google for VBA Outlook paste