一区二区久久-一区二区三区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)系我們修改或刪除,多謝。

主站蜘蛛池模板: 丁香婷婷在线 | 免播放器在线观看 | 黄色激情视频在线观看 | 久久99国产乱子伦精品免费 | 欧美日本高清一本二本三本 | 日韩中文精品亚洲第三区 | 久久98精品久久久久久婷婷 | 久久线看观看精品香蕉国产 | 色美女在线 | 一区二区亚洲视频 | 欧美亚洲国产精品久久 | 51国产偷自视频区视频手机播器 | 性感美女一级毛片 | 欧美激情午夜 | 伊人成人在线视频 | 91超级碰| 日本乱人伦在线观看免费 | 男女视频在线观看免费高清观看 | 五月婷婷激情网 | 国产精品一区二区三 | 91久久线看在观草草青青 | 女人毛片视频 | 国产成人精品视频免费大全 | 亚洲综合精品香蕉久久网 | 一区二区三区免费 | 成人在线观看一区 | 亚洲视频在线观看一区 | 国产精品第5页 | 成人精品综合免费视频 | 国产精品免费视频播放 | 国产高清免费午夜在线视频 | 大jjjj免费看视频 | 碰碰人人 | 国产在线观看第一页 | 色视频www在线播放国产人成 | 午夜激情视频在线 | 精品久久久久久久久免费影院 | 在线伊人网 | 九九国产 | 天堂一区二区三区精品 | 一区二区三区四区精品视频 |