VBA: Message body not shown 
Author Message
 VBA: Message body not shown

Hi all,

When I create an e-mail message with VBA the Body part does not show up.
What am I doing wrong?

I have tested the code in Excel, Word and Outlook (all version 2002, SP-1)
and the result is the same: the e-mail shows up in the Outbox folder with
the correct e-mail address and subject text, but without the body text.

HJ

Private Function TestSendEmail() As Boolean
On Error GoTo Err_TestSendEmail

    'This procedure creates e-mail and sends it
    TestSendEmail = True        'Assume that sending the e-mail will be no
problem

    'Create an e-mail message
    Dim objOutlook As Object, objMessage As Object
    Set objOutlook = CreateObject("Outlook.Application")
    Set objMessage = objOutlook.CreateItem(0) '0 = Message

    'Set the addresses

    'Set subject and body text
    objMessage.Subject = "Test"
    objMessage.Body = "Body text"

    'Send message
    objMessage.Send

    'Clear the variables
    Set objOutlook = Nothing
    Set objMessage = Nothing

Exit_TestSendEmail:
    Exit Function

Err_TestSendEmail:
    TestSendEmail = False       'If any error occurs, assume that the e-mail
has not been sent
    Resume Exit_TestSendEmail

End Function



Fri, 11 Mar 2005 17:01:06 GMT  
 VBA: Message body not shown


Quote:
> Hi all,

> When I create an e-mail message with VBA the Body part does not show up.
> What am I doing wrong?

> I have tested the code in Excel, Word and Outlook (all version 2002, SP-1)
> and the result is the same: the e-mail shows up in the Outbox folder with
> the correct e-mail address and subject text, but without the body text.

> HJ

Had that same problem earlier this month. Installed SP2 & no problem
any more.

HTH



Sat, 12 Mar 2005 20:59:26 GMT  
 VBA: Message body not shown
Thanks! Downloaded and installed SP2. The body text shows up!

HJ


Quote:



> > Hi all,

> > When I create an e-mail message with VBA the Body part does not show up.
> > What am I doing wrong?

> > I have tested the code in Excel, Word and Outlook (all version 2002,
SP-1)
> > and the result is the same: the e-mail shows up in the Outbox folder
with
> > the correct e-mail address and subject text, but without the body text.

> > HJ

> Had that same problem earlier this month. Installed SP2 & no problem
> any more.

> HTH



Sat, 12 Mar 2005 23:05:35 GMT  
 VBA: Message body not shown
Guys,

was this on plain text formatted messages only?  Did you get blank
messages saving plain text messages to drafts?

I'm interested to know whether you had the same problem as me -
something similar pre SP2 for which I ended up using a workaround.

Quote:

> Thanks! Downloaded and installed SP2. The body text shows up!

> HJ





> > > Hi all,

> > > When I create an e-mail message with VBA the Body part does not show up.
> > > What am I doing wrong?

> > > I have tested the code in Excel, Word and Outlook (all version 2002,
>  SP-1)
> > > and the result is the same: the e-mail shows up in the Outbox folder
>  with
> > > the correct e-mail address and subject text, but without the body text.

> > > HJ

> > Had that same problem earlier this month. Installed SP2 & no problem
> > any more.

> > HTH



Sat, 19 Mar 2005 06:25:37 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Q: How can VBA set the font of the message body

2. System.Messaging sending body as ASCI not XML

3. REPOST: Body text not displayed in VBA-generated email (Outlook 2002)

4. Body text not displayed in VBA-generated email

5. Retrieving message body text of currently selected message

6. I have posted several messages that have not shown up

7. Send a hyperlink as part of the message body

8. eMail SQL results in message body

9. (*.RTF) as message body to Outlook, Possible???

10. Replacing message body text in Outlook 2000 7 XP

11. RTF message body from OOM?

12. Subject Line To Message Body

 

 
Powered by phpBB® Forum Software