Try using objNS.Logon "Profile Display Name", "Password", False, False
The strings can be "", "", False, False which is usually the easiest way to
start the default profile or you have Outlook 98/2000 installed in Internet
Mail Only mode.
Quote:
> I am getting an error when I try to force a logon in VB code using
> Set objOutlook = CreateObject("Outlook.Application")
> Set objNS = objOutlook.GetNamespace("MAPI")
> objNS.Logon
> It is a run time error regarding server not available even though I
> have a live dial up connection open. If I have outlook open before I
> execute this code it doesn't force the dialogue logon box to open and I
> don't get an error.
> I would like to call the logon at the beginning of my script.
> I still have not been able to obtain the outlvba.hlp file. My copy of
> Office 97 does not have it - and I can't find it on the Microsoft site.
> Thanks,
> susan
> Sent via Deja.com http://www.*-*-*.com/
> Before you buy.