Hi,
I am trying to embed multiply files (with different file extensions) in a folder using a loop. Adding the files works great, the problem is that when adding the files I get a pop-up for every single file asking "Do you want to open this file?" How do I prevent this from happening? I don't want the pop-up and I don't want the file to open.
I have tried to set application.enableevents and application.displayalerts to false but that doesn't help.
I am trying to embed multiply files (with different file extensions) in a folder using a loop. Adding the files works great, the problem is that when adding the files I get a pop-up for every single file asking "Do you want to open this file?" How do I prevent this from happening? I don't want the pop-up and I don't want the file to open.
I have tried to set application.enableevents and application.displayalerts to false but that doesn't help.
VBA Code:
Dim obj As OLEObject
Set obj = wsOutput.OLEObjects.Add(Filename:=strPathAndFilename, link:=False, displayasicon:=True)
with obj
.height = 100
.width=100
end with