Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE Automation & Outlook
Message
From
16/01/2002 13:31:26
 
 
To
16/01/2002 13:14:59
General information
Forum:
Visual Basic
Category:
VBA
Miscellaneous
Thread ID:
00605519
Message ID:
00605542
Views:
14
You can do the following: Until you hit the send method the body should be considered a text container. You can also insert HTML tags but be sure to set the HTMLBody property. If you prefer you could use another variable to hold your output until you are ready to place it in the mail as shown here:

...
strTextMessage = "Some text"
.. Process whatever If .... then
strTextMessage = strTextMessage & vbcrlf
strTextMessage = strTextMessage & "Some text"
.. If .... then else
strTextMessage = strTextMessage & vbcrlf
strTextMessage = strTextMessage & "Some more text"

oMail.body = strTExtMEssage
oMail.send

>Hi All,
>
>I have a specific requirement in which I need to access the properties of Outlook via VBA through OLE automation. I do not want to use
>oMyObj.Body = "This is my text goes in there" but I want to achieve the same results. For example in MS-Word OLE automation, we can use something like
>
>oMyObj.InsertText = "This is my text goes in there"
>oMyObj.InsertText = vbCrLF
>If .... then oMyObj.InsertText = "My second text"
>etc.
>
>Can I control Outlook in any way without using Body property?
>
>Thanks in advance for your time.
>
>Regards
>Vijay
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform