Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modeless Outlook window from Sendobject.

Status
Not open for further replies.

jtmach

Programmer
Jul 26, 2001
88
US
When using the SendObject command the newly created outlook message window comes up as modal. Is there a way to make it modeless? If not is there a way to do it if you create a mail object the longer way (example below)?
Code:
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment
        Set objOutlook = CreateObject("Outlook.Application")
        Set objOutlookMsg = objOutlook.CreateIte(olMailItem)
        With objOutlookMsg
             .Subject = ""
             .Body = ""
             .Send
        End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
Any help you could give would be appreciated. The hardest questions always have the easiest answers.
 
I don't like the docmd.sendobject method.

The code you included should work fine. Just put it behind a command button or other event. You'll have to create a recordset and use it to populate your outlook objects. Ex:

Set objOutlookRecip = .Recipients.Add(rst.Fields(1).Value)
Have Fun !!!!
 
I know that the code works, the question was, can I make it modeless. I have since discovered that you can.

Code:
objOutlookMsg.display(false)

However if anyone knows how to do this with the sendobject command it would save me some time. Thank you.
The hardest questions always have the easiest answers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top