Re: Outlook security dialog hides behind other windows

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi Cooz,

I can't reproduce this problem. Were you able to pinpoint the exact
circumstaince when the dialog is behind the window?
Otherwise, could it be an idea to let the users press the send button
themselves and use .Display instead of .Send which should activate the email
on showing?

Kind regards,
Astrid
"Cooz" <Cooz@xxxxxxxxxxxxxxxxxxxxxxxxx> schreef in bericht
news:B02FC152-C43B-4C1B-B8A1-429AD27DBEF5@xxxxxxxxxxxxxxxx
Hi everyone,

In one of our templates an email message is generated by means of code:

...
Set oOApp = CreateObject("Outlook.Application")
Set oOMail = oOApp.CreateItem(olMailItem)
With oOMail
.To = Email
.Subject = "Aanvraagformulier " & docNaam & ".doc"
.Body = ""
.Attachments.Add ActiveDocument.Path & "\" & ActiveDocument
.Send
End With
...

Works fine. When this code executes, the Outlook security dialog pops up
as
expected ("A program is trying to automatically send e-mail on your
behalf...") - which is OK. Users are willing to supply one more click.

However, what bothers them, and me, is that this dialog sometimes
disappears
behind other windows. The flashing icon on the taskbar that activates the
dialog is easily overlooked - especially with users who have their taskbar
automatically hidden - and Word seems to have stopped responding. This
behavior seems to occur more often when the above code is run more than
once
with the same document.

Is there a way to ensure - by means of VBA or otherwise - that this dialog
always appears on top of other windows? Perhaps it is possible to minimize
all open windows before it shows up and restoring them afterwards... - but
I
don't know how. Can someone help me out here?

Thank you,
Cooz

(Windows XP, Word 2003, English version)


.


Quantcast