中文字幕日韩一区二区_国产一区二区av_国产毛片av_久久久久国产一区_色婷婷电影_国产一区二区精品

用jscript實現新建和保存一個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. 
復制代碼 代碼如下:
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技術用jscript實現新建和保存一個word文檔,轉載需保留來源!

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

主站蜘蛛池模板: 少妇无套高潮一二三区 | 亚洲精品福利在线 | 老外几下就让我高潮了 | 黄色精品 | 日韩一区二区在线观看视频 | 午夜精品久久久久久久久久久久久 | 成人免费精品视频 | 日韩精品| av在线一区二区三区 | 日本成人三级电影 | 久久网站黄 | 国产精品久久久久国产a级 欧美日韩国产免费 | 欧美在线色 | 国产精品欧美大片 | 中文字幕不卡在线88 | 成人性视频免费网站 | 福利国产| 久久精品成人 | 国产ts人妖一区二区三区 | 91免费电影 | 91中文字幕在线 | 99国产精品久久久久老师 | 亚洲免费网| 福利视频一二区 | 国内精品视频在线观看 | 成人精品鲁一区一区二区 | 狠狠爱视频 | 精品视频一区二区三区四区 | pacopacomama在线 | 欧美日韩电影一区二区 | 狠狠色综合欧美激情 | 91天堂| 国产成人叼嘿视频在线观看 | 在线一区 | 久久精品91久久久久久再现 | 日韩久久久久 | 一区二区在线视频 | 亚洲人va欧美va人人爽 | 日本a视频 | 亚洲国产精品久久久久秋霞不卡 | 欧美中文 |