mailItem.HTMLBody weirdness..

L

lloyd christopher

completely stuck on this one. i'm trying to mimic how outlook does
stationary, but without using stationary for a variety of reasons. what
i've been trying so far is in the mailItem_open event, i set my text in
HTMLBody, and we go from there. that part works. but for replies things
arent going so well. i want to get the current HTMLBody, and then add in my
body at the top and bottom, but all i ever get is a blank message, even
though the first call to HTMLBody definetly gets the old text and im
definetly inserting the correct text. i have no idea what i'm doing wrong.

another intesting thing that came up was is there any way to copy how with
Stationary it creates a plain text message with just what you type in?

thanks, ive been trying on this for a while to no avail..

Lloyd Christopher
SLOW30
 
J

John Ford

My guess would be that you've generated invalid HTML. Adding stuff
before AND after the existing HTML may be your trouble area. First
thing I would do is "view source" after you add your body to the
reply, cut'n'paste the HTML into an HTML editor/validator to see what
it doesn't like about it.

I use CSE HTML validator, found at http://www.htmlvalidator.com/. I
use their free version. I'm sure there's dozens of other tools you
could use. Note that Outlook can generate HTML that isn't perfect, so
some warnings may come up that aren't your fault.

Without seeing your code that changes HTMLBody, it's hard to say what
it might be.

For you second question about copying and plain text, I'm not sure
what you're trying to do...

-jcf


| completely stuck on this one. i'm trying to mimic how outlook does
| stationary, but without using stationary for a variety of reasons.
what
| i've been trying so far is in the mailItem_open event, i set my text
in
| HTMLBody, and we go from there. that part works. but for replies
things
| arent going so well. i want to get the current HTMLBody, and then
add in my
| body at the top and bottom, but all i ever get is a blank message,
even
| though the first call to HTMLBody definetly gets the old text and im
| definetly inserting the correct text. i have no idea what i'm doing
wrong.
|
| another intesting thing that came up was is there any way to copy
how with
| Stationary it creates a plain text message with just what you type
in?
|
| thanks, ive been trying on this for a while to no avail..
|
| Lloyd Christopher
| SLOW30
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top