Force outlook to 'send and receive' from vb.net application


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Force outlook to 'send and receive' from vb.net application

  1. #1
    Join Date
    Mar 2012
    Posts
    1

    Force outlook to 'send and receive' from vb.net application

    Code:
    Imports Microsoft.Office.Interop
    Imports System.Threading
    Imports System.Windows
    Imports Microsoft.Office.Interop.Outlook
    
     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
      	 Dim tempApp As Outlook.Application = New Outlook.Application()
       	 Dim tempInbox As Outlook.MAPIFolder
       	 Dim InboxItems As Outlook.Items
    
    	tempApp = CreateObject("Outlook.Application")
    	tempInbox = tempApp.GetNamespace("Mapi")
    
    End Sub
    ///end of code

    now where do i put this line ?
    oApp.ActiveExplorer.CommandBars("Standard").Controls("Send/Re&ceive").Execute

    this oApp is not working with my decleared name space.
    tell me exatly what i am doing wrong?

    and do i have to add some Outlook controls to the command bar? becose i dont know how to add command bar controls to my project !!
    please explain with code what i am doing wrong.

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Split from an old Classic VB thread into its own thread and moved to the .NET section

Similar Threads

  1. Replies: 0
    Last Post: 06-24-2009, 01:21 PM
  2. Replies: 2
    Last Post: 12-04-2007, 12:46 AM
  3. Replies: 1
    Last Post: 07-27-2007, 06:58 AM
  4. Replies: 1
    Last Post: 01-12-2006, 08:20 PM
  5. Force Outlook Send/Receive in VB Code
    By anonymous in forum VB Classic
    Replies: 4
    Last Post: 06-03-2003, 03:02 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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

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