天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

用jscript實(shí)現(xiàn)新建和保存一個(gè)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實(shí)現(xiàn)新建和保存一個(gè)word文檔,轉(zhuǎn)載需保留來(lái)源!

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

主站蜘蛛池模板: 青柠在线观看免费高清电视剧荣耀 | 久久人妻少妇嫩草AV蜜桃99 | 国产精品麻豆a啊在线观看 国产精品麻豆AV | 久久婷婷久久一区二区三区 | 国产强奷糟蹋漂亮邻居在线观看 | 黑人巨大两根一起挤进欧美 | 高清无码中文字幕在线观看视频 | 东京热无码中文字幕av专区 | 翘臀少妇被扒开屁股日出水爆乳 | 成人免费观看在线视频 | 丝袜美女被啪啪不带套漫画 | 秋葵app秋葵官网18在线观看 | 久久免费资源福利资源站 | yy8090理论三级在线看 | 人妻少妇69式99偷拍 | 私密按摩师在线观看 百度网盘 | 国产成人免费手机在线观看视频 | 伊人久99久女女视频精品免 | 伊人久久大香线蕉无码麻豆 | 求个av网站| 国产精品99久久免费黑人人妻 | 中国老太性色xxxxxhd | 美女张开腿露尿口给男人亲 | 久久国产主播福利在线 | 麻豆高清免费国产一区 | 欧美性FREE玩弄少妇 | 插骚妇好爽好骚 | 无颜之月全集免费观看 | 欧美另类极品videosbest | 国产成人8x视频一区二区 | 99视频一区| 国产九九熟女在线视频 | 亚洲免费三区 | 亚洲中久无码永久在线 | 在线播放国产视频 | 快播电影频道 | 久久伊人精品青青草原2021 | 国产精品成人免费视频99 | 国产一级毛片在线 | 日本久久免费大片 | 精品网站一区二区三区网站 |