ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dialog not displayed to the front (https://www.excelbanter.com/excel-programming/309893-dialog-not-displayed-front.html)

Leendert

Dialog not displayed to the front
 
Hello,

Could somebody please help me with the following problem we are
experiencing since an Office update?

When I send an document as a MailItem from Excel with VBA (with the
VBA code Send), a safety alert sometimes comes behind the Excel
window: "A program is trying to automatically send e-mail on your
behalf. Do you want to allow this. If this is unexpected, it may be a
virus and you should choose "No"."

When this dialog is not displayed to the front, it is not possible to
respond, so after a view seconds comes another dialog box: "Microsoft
Excel is waiting for another application to complete an OLE action".

It is strange that this problem does not occur on all the computers we
use. What is the solution to get the alert always display to the
front?

We use Office 2000 and Office 2002 (Windows 2000 and Windows XP).

Here is the VBA code that I use:

Set myOlApp = CreateObject("Outlook.Application")
Set MyItem = myOlApp.CreateItem(olMailItem)
MyItem.To = ToVar
MyItem.Subject = "Afwezigheidsregistratie " & ActiveSheet.Range("A3")
Set myAttachments = MyItem.Attachments
myAttachments.Add Pad, , 1
MyItem.Send


With kind regards,

Leendert Meijer

Leendert

Dialog not displayed to the front
 
(Leendert) wrote in message . com...
Hello,

Could somebody please help me with the following problem we are
experiencing since an Office update?

When I send an document as a MailItem from Excel with VBA (with the
VBA code Send), a safety alert sometimes comes behind the Excel
window: "A program is trying to automatically send e-mail on your
behalf. Do you want to allow this. If this is unexpected, it may be a
virus and you should choose "No"."

When this dialog is not displayed to the front, it is not possible to
respond, so after a view seconds comes another dialog box: "Microsoft
Excel is waiting for another application to complete an OLE action".

It is strange that this problem does not occur on all the computers we
use. What is the solution to get the alert always display to the
front?

We use Office 2000 and Office 2002 (Windows 2000 and Windows XP).

Here is the VBA code that I use:

Set myOlApp = CreateObject("Outlook.Application")
Set MyItem = myOlApp.CreateItem(olMailItem)
MyItem.To = ToVar
MyItem.Subject = "Afwezigheidsregistratie " & ActiveSheet.Range("A3")
Set myAttachments = MyItem.Attachments
myAttachments.Add Pad, , 1
MyItem.Send


With kind regards,

Leendert Meijer


Can nobody help me?

Leendert

Dialog not displayed to the front
 
I think this problem is too difficult.

(Leendert) wrote in message . com...
(Leendert) wrote in message . com...
Hello,

Could somebody please help me with the following problem we are
experiencing since an Office update?

When I send an document as a MailItem from Excel with VBA (with the
VBA code Send), a safety alert sometimes comes behind the Excel
window: "A program is trying to automatically send e-mail on your
behalf. Do you want to allow this. If this is unexpected, it may be a
virus and you should choose "No"."

When this dialog is not displayed to the front, it is not possible to
respond, so after a view seconds comes another dialog box: "Microsoft
Excel is waiting for another application to complete an OLE action".

It is strange that this problem does not occur on all the computers we
use. What is the solution to get the alert always display to the
front?

We use Office 2000 and Office 2002 (Windows 2000 and Windows XP).

Here is the VBA code that I use:

Set myOlApp = CreateObject("Outlook.Application")
Set MyItem = myOlApp.CreateItem(olMailItem)
MyItem.To = ToVar
MyItem.Subject = "Afwezigheidsregistratie " & ActiveSheet.Range("A3")
Set myAttachments = MyItem.Attachments
myAttachments.Add Pad, , 1
MyItem.Send


With kind regards,

Leendert Meijer


Can nobody help me?



All times are GMT +1. The time now is 02:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com