Link to home
Start Free TrialLog in
Avatar of BVass
BVass

asked on

Using VBA to View Source Code for HTML File Opened in IE

Hi,

I am trying to get my VBA in Access to open a .htm file in IE and then save the source code so I can add it to the body of an email.

I can get IE to open and navigate to the file (see code snippet), but this is as far as I can get.

I need the code to be able to view / save the underlying HTML Code for this file.

Thanks,

BVass
Function IECode()
 
Dim ieApp as Object
 
    Set ieApp = CreateObject("internetexplorer.application")
    ieApp.navigate2 "file:///F:/Work/Mail%20Merge/BrokerageFee.htm"
    ieApp.Visible = True
 
End Function

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This code doesn't do anything.