I'm building a script that will be triggered by a rule from Outlook 2007. The script is looking for a specific string in the body of the message and extracting some text.
I'd like to copy that text into the clipboard to use it in another application.
Here is my code:
Sub SaveAsText(MyMail As MailItem)
Dim pos As String
Dim loco As String
pos = InStr(MyMail.Body, "message for Loco")
loco = Mid(MyMail.Body, pos + 17, 8)
My text is stored in the variable loco, but I can't figure out how to save the value of the string variable in the clipboard.
Thanks for your help.