A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Logon to Outlook from VB



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 4th 08, 10:31 PM posted to microsoft.public.outlook.program_vba
Werner Leupold
external usenet poster
 
Posts: 1
Default Logon to Outlook from VB

Hi NG,
I try to access Outlook from VB6.
That works fine if Outlook is not password protected.
Whenever the outlook application is password protected it is not possible to
use the following code snipplet:

Dim oApp As New Outlook.Application
Dim oNS As Outlook.NameSpace
Set oApp = New Outlook.Application
Set oNS = oApp.GetNamespace("MAPI")

oNS.Logon "Outlook", "myPassword", False, True

Though the password is correct there will be a password dialog displayed and
I have to type in the password.
No matter if Outlook is running or not.

Thanks for helping

Werner
Ads
  #2  
Old January 4th 08, 10:46 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Logon to Outlook from VB

The logon is really only for Exchange mailbox logon and is pretty useless,
certainly for password protected PST files. There's nothing you can do about
that other than not using password protected PST files or being there to
logon manually.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Werner Leupold" wrote in message
...
Hi NG,
I try to access Outlook from VB6.
That works fine if Outlook is not password protected.
Whenever the outlook application is password protected it is not possible
to
use the following code snipplet:

Dim oApp As New Outlook.Application
Dim oNS As Outlook.NameSpace
Set oApp = New Outlook.Application
Set oNS = oApp.GetNamespace("MAPI")

oNS.Logon "Outlook", "myPassword", False, True

Though the password is correct there will be a password dialog displayed
and
I have to type in the password.
No matter if Outlook is running or not.

Thanks for helping

Werner


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot logon to outlook for mail oskathaylon Outlook - General Queries 2 September 18th 07 08:10 AM
Outlook Logon using RPC/HTTPS eLINIA Outlook - Installation 3 June 5th 07 01:53 AM
Outlook Express Logon Problem digf Outlook Express 2 January 13th 07 09:22 AM
Hotmail Logon in Outlook Express john86441 Outlook Express 4 April 4th 06 02:32 AM
Outlook XP Logon Issue Himalaya Outlook - General Queries 0 January 25th 06 04:18 PM


All times are GMT +1. The time now is 06:47 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.