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.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!