Microsoft Office Tutorials and References
In Depth Information
Sending a Web Page as the Body of an E-mail Message
"Database Path : " & strFileName, _¶
vbOKOnly + vbExclamation, "Error"¶
ElseIf Err Then¶
'Another critical error¶
MsgBox Err.Number & "-" & Err.Description, _¶
vbOKOnly + vbExclamation, "Error"¶
End If¶
End Sub¶
Set the strFileName and tblName variables to the desired values.
Sending a Web Page as the Body of an E-mail Message
This macro creates an e-mail message that includes a web page at a given URL.
Scenario: Even though a web page does not offer an “e-
mail this page” type of link, an e-mail of the page can still be
done using this code.
Alternatively, you could create an advertisement for your
website in HTML that you want to e-mail to your favorite
clients exactly as it appears. Use this procedure.
Out
View the Appendix to learn how to store this procedure
in a Standard module.
Option Explicit¶
' * * * * *¶
'API Declaration¶
Private Declare Function GetTempPath Lib "kernel32" _¶
Alias "GetTempPathA" (ByVal nSize As Long, _¶
ByVal lpBuffer As String) As Long¶
Private Declare Function URLDownloadToFile Lib "urlmon" _¶
Alias "URLDownloadToFileA" (ByVal pCaller As Long, _¶
ByVal szURL As String, ByVal szFileName As String, _¶
ByVal dwReserved As Long, ByVal lpfnCB As Long) _¶
As Long¶
Private Declare Function InternetOpen Lib "wininet" _¶
Alias "InternetOpenA" (ByVal sAgent As String, _¶
ByVal lAccessType As Long, _¶
ByVal sProxyName As String, _¶
ByVal sProxyBypass As String, _¶
ByVal lFlags As Long) As Long¶
 
Search JabSto ::




Custom Search