I have now got a simple method in my vba code that can create an email, adn send it to my drafts folder.
On top of that, I have a bit of code that can walk through all the folders in a users Outlook and seelct the Templates Folder.
Once I have the template I need, then I hit a brick wall.
the code is
where templateMail is of type MailItem
Via the Object Browser I can see the Body property, and in the object browser it is a string. But I cannot retrieve it.
What I need to do is to parse the body in some way, so that I can search for certain tokens (in this case {Reason}, and replace that with the reason that the rejection has ocurred.)
however the code runs to s and then complains that an object is required. I have tried to make s an object, but that makes no difference.
Help!
K
On top of that, I have a bit of code that can walk through all the folders in a users Outlook and seelct the Templates Folder.
Once I have the template I need, then I hit a brick wall.
the code is
Code:
With templateMail
Dim s As String
Set s = templateMail.Body
End With
where templateMail is of type MailItem
Via the Object Browser I can see the Body property, and in the object browser it is a string. But I cannot retrieve it.
What I need to do is to parse the body in some way, so that I can search for certain tokens (in this case {Reason}, and replace that with the reason that the rejection has ocurred.)
however the code runs to s and then complains that an object is required. I have tried to make s an object, but that makes no difference.
Help!
K