
Outlook doesn't properly start on external activation
Does this Outlook have more than 1 profile? In that case I'd expect a
hang since your login doesn't have a profile, password or a dialog.
Why even use the Logon method at all?
--
Ken Slovak
[MVP - Outlook]
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Co-author of "Programming Microsoft Outlook 2000", Chapters 8-13,
Appendices, Sams
Quote:
> Hi,
> I'm using the following code snippet to send emails from a
client-side
> app:
> On Error Resume Next
> Dim oo, ns, newmsg, strAdd$
> Set oo = CreateObject("Outlook.Application")
> Set ns = oo.GetNamespace("MAPI")
> If oo = "Outlook" Then
> ns.Logon "", ""
> Set newmsg = oo.CreateItem(0)
> newmsg.Subject = "Subject"
> newmsg.Body = "Body"
> newmsg.Send
> ns.Logoff
> End If
> Set ns = Nothing
> Set oo = Nothing
> This works fine as long as Outlook (I'm using 2000, btw) is running.
> However, if it's not, it tries to start up (I can see that within
the
> taskmanager) and then halts. No CPU usage, no dialog popups, no
> nothing. The client then, of course, hangs too.
> What can be the reason for this behaviour? Any help is greatly
> appreciated.
> - Ron