printing from Word using win32com

Frederick H. Bartlett fbartlet at optonline.net
Sat Dec 29 02:44:16 CET 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