tags:

views:

7

answers:

0

Private Sub NewToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewToolStripMenuItem.Click Dim sFileName As String

    With OpenFileDialog1
        .FileName = "d:\my documents\01.xls"
        .OpenFile()
        sFileName = .FileName
    End With

    If Len(sFileName) Then
        oDocument = Nothing
        WebBrowser1.Navigate(sFileName)
    End If


    With OpenFileDialog1
        .Filter = "Office Documents " & _
        "(*.doc, *.xls, *.ppt)|*.doc;*.xls;*.ppt"
        .FilterIndex = 1

    End With
End Sub

Private Sub Form_Unload(ByVal Cancel As Integer)
    oDocument = Nothing
End Sub

Private Sub WebBrowser1_NavigateComplete2(ByVal pDisp As Object, _
ByVal File As Object)
    On Error Resume Next
    oDocument = pDisp.Document

End Sub