DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: VB6 with Microsoft Outlook

  1. #1
    Join Date
    Nov 2004

    VB6 with Microsoft Outlook

    I have an application where it automaticly sends out an email, which is doing its thing and working fine. However once in a while I get in there and step thru the email code and the email creation seems to open and then hide or something because I can not see the lines of code exicuting when I step thru it one step at a time. Is there anyway I can keep the email displayed while it is being created so I can see the action of each line of code?
    I am using the below code.

    Dim olApp As New Outlook.Application
    Dim NewMail As Outlook.MailItem
    On Error GoTo SendEmailAlertErrorNew
    EmailHasBeenSent = False
    If frmMain.opEmailOn(i).Value = False Then GoTo AroundEmailNew
    Set NewMail = olApp.CreateItem(olMailItem)

    NewMail.Recipients.Add (frmConfiguration.lboxEmailAdd(j).List(l)) 'add the email name as a recipient, list item l from list box j

    NewMail.Subject = "Hello"
    NewMail.Body = "Hi"

    Set NewMail = Nothing

  2. #2
    Join Date
    Apr 2007
    Sterling Heights, Michigan
    Is there a Visible property to your Mailitem object?

  3. #3
    Join Date
    Nov 2004
    Yes, that did it. It was:

    NewMail.Display (modal)

    Thanks for the help.

Similar Threads

  1. Outlook Problem in VB6
    By Spumbu1977 in forum VB Classic
    Replies: 4
    Last Post: 03-28-2006, 03:51 PM
  2. working with Outlook
    By AM003295 in forum VB Classic
    Replies: 4
    Last Post: 07-19-2005, 10:03 AM
  3. Have you forgot what made VB great?
    By max caber in forum .NET
    Replies: 293
    Last Post: 10-01-2003, 12:00 AM
  4. Replies: 255
    Last Post: 02-13-2002, 08:32 PM
  5. Microsoft Breakup Lunacy
    By rlynchttl in forum Talk to the Editors
    Replies: 19
    Last Post: 06-21-2000, 10:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center