<form id="hbx9t"></form>

<noframes id="hbx9t">

    <em id="hbx9t"><span id="hbx9t"></span></em>

        <noframes id="hbx9t"><address id="hbx9t"><th id="hbx9t"><progress id="hbx9t"></progress></th></address>
        office交流網--QQ交流群號

        Access培訓群:792054000         Excel免費交流群群:686050929          Outlook交流群:221378704    

        Word交流群:218156588             PPT交流群:324131555

        在access中導入HTML文件

        2020-12-26 08:00:00
        tmtony8
        原創
        4822

        作為office的組件,access和word,Excel這些交互是很簡單。

        當然了,單純與office其他組件互相導入導出顯然是不夠的。這里我們學習一下用vba代碼導入HTML文件


        Private Sub ImportHTML_Click()
            Dim Dlg As Office.FileDialog
            Dim htmlPath As String
            Set Dlg = Application.FileDialog(msoFileDialogOpen)
            With Dlg
                .Title = "請選擇導入的HTML文件"
                .Filters.Clear
                .Filters.Add "HTML文件", "*.html"
                .Show
            End With    
            htmlPath = Dlg.SelectedItems.Item(1)
            '將選擇的HTML文件導入
            DoCmd.TransferText acImportHTML, , " HTML表", htmlPath, 1
        End Sub
        


          分享