컴퓨터에서 네트워크 어댑터 데이터를 검색하고
Microsoft Word 문서에 해당 데이터를 표시한 다음
문서를 C:ScriptsWordTestdoc.doc로 저장하는 데모 스크립트입니다.
objWord 설정==CreateObject("Word.Application")
objWord.Caption 설정=="캡션 테스트"
objWord.Visible 설정=True
objDoc 설정=objWord.Documents.Add ()
objSelection 설정 = objWord.Selection
objSelection.Font.Name = "Arial"
objSelection.Font.Size = "18"
objSelection.TypeText "네트워크 어댑터 보고서"
objSelection.TypeParagraph()
objSelection.Font.Size = "14"
objSelection.TypeText "" & Date()
objSelection.TypeParagraph()
objSelection.TypeParagraph()
objSelection.Font.Size = "10"
strComputer = "." set objwmiservice = getObject ( "winmgmts : \"& strcomputer & "rootcimv2")
set colitems = objwmiservice.execquery _
( "win32_networkadapterconfiguration의 선택*) colItems
objSelection.Font.Bold = True
objSelection.TypeText "ARP 항상 소스 경로: "
objSelection.Font.Bold = False
objSelection.TypeText "" & objItem. ArpAlwaysSource경로
objSelection.TypeParagraph()
objSelection.Font.Bold = True
objSelection.TypeText "ARP EtherSNAP 사용: "
objSelection.Font.Bold = False
objSelect ion.TypeText " " & objItem.ArpUseEtherSNAP
objSelection.TypeParagraph()
objSelection.Font.Bold = True
objSelection.TypeText "캡션:"
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 감지 활성화됨:
objSelection .Font.Bold = False
objSelection.TypeText "" & objItem.DeadGWDetectEnabled
objSelection.TypeParagraph()
objSelection.Font.Bold = True
objSelection.TypeText "D 기본 IP 게이트웨이: "
objSelection.Font.Bold = False
objSelection.TypeText "" & objItem.DefaultIPGateway
objSelection.TypeParagraph()
objSelection.Font.Bold = True
objSelection.TypeText "기본 TOS:"
objSelection.Font.Bold = False
objSelection.TypeText "" & objItem.DefaultTOS
objSelection.TypeParagraph()
objSelection.Font.Bold = True
> 이온.글꼴.굵게 = True
objSelection.TypeText "설명: "
objSelection.Font.Bold = True
objSelection.Font.Bold = False
objSelection.TypeText "" & objItem.Description
obj Selection.TypeParagraph ()
objSelection.TypeParagraph()
다음
objDoc.SaveAs("C:ScriptsWordtestdoc.doc")
objWord.Quit