Log in

View Full Version : IE11 Download Manager Screws My VBA



JBSMichael
11-03-2015, 02:37 AM
Hi All,

I have a Word 2010 document (a) that uses VBA to open another document (b) which is held in Sharepoint, copy some bookmarked text from (b), and paste the text into (a). It has worked fine for some time, until the other week when I upgraded to IE11. In IE11, clicking on a SharePoint file to open it results in a pop up 'Download Manager' dialogue box that asks the user to actively choose to either open or save the file, and according to my research so far it is impossible to disable this dialogue. The issue is that the VBA that controls the opening and subsequent copy operation in document (b) is interrupted by this dialogue box and fails as a result. Has anyone else come across this and found a solution to it?

My code below for info. Thanks in advance...


Private Sub CommandButton11_Click()

Dim docMOD As Document
Dim doc As Document
Dim strLink As String

Set doc = ActiveDocument

strLink = InputBox("Please paste a link to the Tasking Request file in the box below, then click OK. In the box that follows, click OK again.", "Source File", vbOKCancel)
If strLink = vbNullString Then Exit Sub
doc.FollowHyperlink (strLink)
Set docMOD = ActiveDocument
docMOD.Bookmarks("Part1Content").Range.Copy
doc.Bookmarks("Part1Start").Range.Select
Selection.Paste
doc.Activate
docMOD.Close (False)

End Sub