Control IE from VBA

Jammydan

Board Regular
Joined
Feb 15, 2010
Messages
141
Hi, I have the following code which sends a google web search to Internet Explorer. What I need is to then automate "Edit with Microsoft Word" which is found in the IE File menu. Does anybody have any suggestions for this?

Code:
Sub HyperSearchDan()
Dim Google As String
Dim NoVerb As String
Google = [GoogleEnd]
NoVerb = [GoogleNoVerb]
Application.ScreenUpdating = False
On Error Resume Next
Sheet1.[SearchADG].Replace What:="&", Replacement:="and" ' & operator causes issue with Google search
Sheet2.Visible = xlSheetVisible ' Data
Sheet2.Activate
    
    For Each Cell In [WebSearch]
        If Cell = "Empty" Then GoTo JumpDan
        If Cell.Value Like "*and *" Then ' no Verbatim
            Cell.Select
                ThisWorkbook.FollowHyperlink Address:=NoVerb & ActiveCell, NewWindow:=True
        Else: 'Verbatim
            Cell.Select
                ThisWorkbook.FollowHyperlink Address:=Google & ActiveCell, NewWindow:=True
        End If
    Next Cell
GoTo JumpDan
JumpDan:
    [TimeStampDG].Value = Now
    Sheet2.Visible = xlSheetVeryHidden
Application.ScreenUpdating = True
Call AuditTrail
End Sub

Many thanks
Dan
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,216,075
Messages
6,128,662
Members
449,462
Latest member
Chislobog

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top