Results 1 to 2 of 2
  1. #1
    MatthewGrace is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    159

    Open Address Field in Web Browser

    I have a button that opens a web page based on a field. It works just fine:

    Code:
    Private Sub cmdPreview_Click()
        'Launch IE
        Dim ie As Object
        Set ie = CreateObject("InternetExplorer.Application")
        ie.Visible = True
        ie.navigate Me.subEmailAssets.Form![Address]
        Set ie = Nothing
    End Sub
    But it comes up short in one situation: If that [Address] field happens to be an .mp4 it does NOT open the browser (IE), but instead prompts the user to download the .mp4. Is there any way to suppress my "ie" objects desire to automatically open this window?
    Click image for larger version. 

Name:	DownloadPrompt.jpg 
Views:	15 
Size:	115.2 KB 
ID:	26807

    While we're at it, you can see I'm doing this all using InternetExplorer.Application class. Is there something more recent for Microsoft Edge? Or any other class - so long as its object model is thoroughly documented with code samples so I can figure out how to use it?



    Thank you.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    have you tried the followhyperlink method rather than creating an internet explorer object?

    Code:
    swebpath = "http://techslides.com/demos/sample-videos/small.mp4"
    Application.FollowHyperlink swebpath

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 01-06-2018, 03:26 PM
  2. Replies: 1
    Last Post: 08-10-2016, 06:16 PM
  3. Replies: 9
    Last Post: 11-22-2015, 11:19 AM
  4. Replies: 3
    Last Post: 08-26-2015, 09:50 AM
  5. Replies: 3
    Last Post: 01-17-2013, 10:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums