VBA/Excel/Access/Word/Outlook/InternetExplorer — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 15:47, 26 мая 2010
Show Mail item in IE
<source lang="vb">
Public Sub ShowIE()
Dim omail As Outlook.MailItem Dim colSelection As Outlook.Selection Set colSelection = Application.ActiveExplorer.Selection If colSelection.Count = 1 Then Set omail = colSelection.Item(1) Call ViewInIE(omail) End If Set omail = Nothing Set colSelection = Nothing
End Sub Private Sub ViewInIE(objMail As Outlook.MailItem)
Dim strURL As String Dim strPath As String strPath = "c:\" & objMail.Subject & ".htm" objMail.SaveAs strPath, olHTML strURL = "File://" & strPath Set m_objIE = New InternetExplorer m_objIE.Visible = True m_objIE.Navigate strURL
End Sub
</source>