I get the error message, "Cast from type 'IWebBrowser2' to type
'Integer' is not valid."
I can't see why IWebBrowser2 is being cast into Integer... there was no
Integer in the API declare:
<DllImport("urlmon.dll", CharSet:=CharSet.Auto, preservesig:=False)> _
Private Shared Sub URLDownloadToFile( _
<MarshalAs(UnmanagedType.IUnknown)> ByVal pCaller As
Object, _
ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As Integer, _
ByVal lpfnCB As IntPtr)
End Sub
Is this the same to the declare you're using?
Besides, I also provided another way of saving the PDF file by automating
the Save a Copy dialog box (see that previous post). Is that working?
Thanks,
Jie Wang
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business days is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.