My scripting ability is limited. I have an application running in the background that will generate AND INSERT a string into a text editor or field when a key sequence is entered, e.g. I open notepad and press the key sequence, the result is the string.
I also have a simple script for generating an email via outlook. What I need help with is how to use sendkey method to put the resulting string into the body of the message. (the message body would be the result of SendKeys "%+a")
Here is the email script:
Thanks!
I also have a simple script for generating an email via outlook. What I need help with is how to use sendkey method to put the resulting string into the body of the message. (the message body would be the result of SendKeys "%+a")
Here is the email script:
Code:
Dim ToAddress
Dim FromAddress
Dim MessageSubject
Dim MessageBody
Dim ol, ns, newMail
ToAddress = "name@address.com"
MessageSubject = "test message"
MessageBody = "string"
Set ol = WScript.CreateObject("Outlook.Application")
Set ns = ol.getNamespace("MAPI")
Set newMail = ol.CreateItem(olMailItem)
newMail.Subject = MessageSubject
newMail.Body = MessageBody & vbCrLf
newMail.RecipIents.Add(ToAddress)
newMail.Send
SET OL = NOTHING
SET NS = NOTHING
SET NEWMAIL = NOTHING
Thanks!