一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

用jscript實現(xiàn)新建和保存一個word文檔

Demonstration script that retrieves NETwork adapter data from a computer, 
displays that data in a Microsoft Word document, and then saves the 
document as C:/Scripts/Word/Testdoc.doc. 
復(fù)制代碼 代碼如下:
Set objWord = CreateObject("Word.Application")
objWord.Caption = "Test Caption"
objWord.Visible = True

Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection

objSelection.Font.Name = "Arial"
objSelection.Font.Size = "18"
objSelection.TypeText "NETwork Adapter Report"
objSelection.TypeParagraph()

objSelection.Font.Size = "14"
objSelection.TypeText "" & Date()
objSelection.TypeParagraph()
objSelection.TypeParagraph()

objSelection.Font.Size = "10"

strComputer = "."
Set objWMIService = GetObject("winmgmts://" & strComputer & "/root/cimv2")
Set colItems = objWMIService.ExecQuery _
    ("Select * from Win32_NETworkAdapterConfiguration")

For Each objItem in colItems

    objSelection.Font.Bold = True
    objSelection.TypeText "ARP Always Source Route: " 
    objSelection.Font.Bold = False
    objSelection.TypeText "" & objItem.ArpAlwaysSourceRoute
    objSelection.TypeParagraph()

    objSelection.Font.Bold = True
    objSelection.TypeText "ARP Use EtherSNAP: "
    objSelection.Font.Bold = False
    objSelection.TypeText ""  & objItem.ArpUseEtherSNAP
    objSelection.TypeParagraph()

    objSelection.Font.Bold = True
    objSelection.TypeText "Caption: "
    objSelection.Font.Bold = False
    objSelection.TypeText ""  & objItem.Caption
    objSelection.TypeParagraph()

    objSelection.Font.Bold = True
    objSelection.TypeText "Database Path: "
    objSelection.Font.Bold = False
    objSelection.TypeText ""   & objItem.DatabasePath
    objSelection.TypeParagraph()

    objSelection.Font.Bold = True
    objSelection.TypeText "Dead GW Detection Enabled: "
    objSelection.Font.Bold = False
    objSelection.TypeText ""   & objItem.DeadGWDetectEnabled
    objSelection.TypeParagraph()

    objSelection.Font.Bold = True
    objSelection.TypeText "Default IP Gateway: " 
    objSelection.Font.Bold = False
    objSelection.TypeText "" & objItem.DefaultIPGateway
    objSelection.TypeParagraph()

    objSelection.Font.Bold = True
    objSelection.TypeText "Default TOS: "
    objSelection.Font.Bold = False
    objSelection.TypeText ""  & objItem.DefaultTOS
    objSelection.TypeParagraph()

    objSelection.Font.Bold = True
    objSelection.TypeText "Default TTL: "
    objSelection.Font.Bold = False
    objSelection.TypeText ""  & objItem.DefaultTTL
    objSelection.TypeParagraph()

    objSelection.Font.Bold = True
    objSelection.TypeText "Description: "
    objSelection.Font.Bold = True
    objSelection.Font.Bold = False
    objSelection.TypeText ""  & objItem.Description
    objSelection.TypeParagraph()

    objSelection.TypeParagraph()

Next

objDoc.SaveAs("C:/Scripts/Word/testdoc.doc")
objWord.Quit




JavaScript技術(shù)用jscript實現(xiàn)新建和保存一個word文檔,轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 综合成人 | 伊人久久久久久久久久 | 韩国福利影视一区二区三区 | 色综合图片二区150p | 国产日韩精品欧美一区喷 | 日本高清中文字幕一区二区三区 | 日韩一区二区久久久久久 | 激情五月婷婷综合网 | 国产欧美亚洲三区久在线观看 | 国产成人精品亚洲一区 | 国产永久视频 | 伊人蕉久 | 美女被男人扒开腿猛网站 | 国产伦精品一区二区三区女 | 国产精品久久久久久吹潮 | 久热香蕉视频 | 亚洲欧美在线免费观看 | 久久只有这才是精品99 | 深爱综合网| 精品无码久久久久久国产 | 欧美色成人综合 | 国产高清视频在线 | 中文字幕精品一区影音先锋 | 午夜爽爽性刺激一区二区视频 | 欧美7777kkkk免费看258 | 国产婷婷色一区二区三区 | 欧美日韩一二三四区 | 欧美午夜性刺激在线观看免费 | 国产偷2018在线观看午夜 | 精品小视频在线观看 | 久久久亚洲精品蜜桃臀 | 中文字幕精品一区二区三区视频 | 欧美日韩国产一区二区三区不卡 | 精品无人区一区二区三区 | 国产成人精品日本亚洲网站 | 久久久久久国产精品mv | 国产亚洲精品2021自在线 | 四虎永久在线精品免费影视 | 亚洲国产第一 | 国产乱理论片在线观看理论 | 91在线九色 |