printing from Word using win32com

Frederick H. Bartlett fbartlet at optonline.net
Fri Dec 28 20:44:16 EST 2001


How do I get rid of the UnicodeError in 

    something = myWord.ActiveDocument.Paragraphs
    for item in something:
        try:
            print str(item).encode('latin-1')
        except UnicodeError:
            print "XXX There was a Unicode Error."

Thanks!



More information about the Python-list mailing list