I need to automate the downloading of files identified in web hyperlinks contained in the body of incoming email messages. No problem using Outlook automation to open the messages and parsing them to extract the links. And calling the Windows API function URLDownlLoadToFile then usually works fine. But problems arise with one company whose messages containing links formatted as
http://www.companyname.com/Admin/FormCenter/Submissions/ViewFile/446/?name=PhotoFile.jpg. In those cases URLDownlLoadToFile returns html page code that again contains that link, rather the actual photo file sought. Manually clicking such links from a web browser does present an option to either save or open the needed file, so might the solution involve automating Internet Explorer, or using the WebBrowser control? Or is there an easier way?