Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to auto open file from hyperlinks?

Status
Not open for further replies.

David1874

Technical User
Jun 17, 2003
2
US
Hello,

I am working on a marco in excel that can automatically open a file with link stored in cell B4. Here is the part of code for opening the file:

Range("B4").Select
Selection.Hyperlinks(1).Follow NewWindow:=False,
AddHistory:=True

If the file is .txt, then it works fine. But since the file is of a different type (.dxw), a popup window with title "microsoft office" saying that the file can contain virus, and ask user to click "ok" to continue open the file. I would lke to know how to automatically click "ok" button without notifying the user? I'm using office 2000.

Thanks a lot!!!
 
You could use this :-

Sendkeys "{ENTER}", True

but its not good, other events can complicate this, there must be a better way.
 
Thanks you....I now know the answer,

just uncheck the "confirm open after download" option of the file extension under folder option, then no popup will appear again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top