[python-win32] i have this code, how do i passed to word

Emanuel Sotelo ing_emanuels at hotmail.com
Fri Jul 25 19:36:18 CEST 2008



hello again well this time a grab this code from a web page, the result is printed in the Interactive
 Window, now i will appreciated if some can help me pass this result to microsoft word
This example shows you the available ProgIDs of the Windows
applications which are installed and
 ahould be usable  with win32com
i will leave the code here:

import win32com.client
from win32com.client import Dispatch

strComputer = "."
objWMIService = win32com.client.Dispatch("WbemScripting.SWbemLocator")
objSWbemServices = objWMIService.ConnectServer(strComputer,"root\cimv2")
colItems = objSWbemServices.ExecQuery("Select * from Win32_ProgIDSpecification")
for objItem in colItems:
    print "Caption: ", objItem.Caption
    print "Check ID: ", objItem.CheckID
    print "Check Mode: ", objItem.CheckMode
    print "Description: ", objItem.Description
    print "Name: ", objItem.Name
    print "Parent: ", objItem.Parent
    print "ProgID: ", objItem.ProgID
    print "Software Element ID: ", objItem.SoftwareElementID
    print "Software Element State: ", objItem.SoftwareElementState
    print "Target Operating System: ", objItem.TargetOperatingSystem
    print "Version: ", objItem.Version
    print "-------------------------------------------------------------------"

_________________________________________________________________
Tenemos lo que búscas…JUEGOS.
http://club.prodigymsn.com/ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20080725/26a50db0/attachment.htm>


More information about the python-win32 mailing list