>I'm having trouble establishing a MAPI session. When I use the .Signon method I always get a "Invalid Profile" message and it shos a "Select Profile" pulldown menu. There is only one profile set up on the computer and it is the default. > >eg. > >oMapiS.UserName= >oMapiS.Password= >oMapiS.DownLoadMail=.f. >oMapiS.SignOn > >This is where I get the error. The error goes away if the Windows Messaging program is already running. It works fine otherwise. Of course, Windows Messaging is a real pig memory-wise and takes forever to load. > >HELP !!
Rob, I had the same problem using mapi. This is what I did was before calling the signon method, I look in the registry for the default profile name and set the mapi username property to that value. This seems to have done the trick. Let me know if you need help with reading from the registry. Here are the registry keys in question:
Windows NT HKey_Current_User\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\DefaultProfile
Windows 95 HKey_Current_User\Software\Microsoft\Windows Messaging Subsystem\Profiles\DefaultProfile