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)
End Sub
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.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your response...

Discuss This Question: &nbsp

There was an error processing your information. Please try again later.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your reply...

There was an error processing your information. Please try again later.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your reply...

Ask a Question

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!

To follow this tag...

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy