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?
Many thanks
Dan
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