REPOST: 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!

========= WAS CANCELLED BY =======:
Path: news.sol.net!spool1-nwblwi.newsops.execpc.com!newsfeeds.sol.net!newspump.sol.net!newsfeed.direct.ca!look.ca!newsfeed.dacom.co.kr!news-hub.kaist.ac.kr!feeder.kornet.net!news1.kornet.net!ua4canc3ll3r
From: "Frederick H. Bartlett" <fbartlet at optonline.net>
Newsgroups: comp.lang.python
Subject: cmsg cancel <3C2D2007.AD251D51 at optonline.net>
Control: cancel <3C2D2007.AD251D51 at optonline.net>
Date: Mon, 31 Dec 2001 04:42:55 GMT
Organization: A poorly-installed InterNetNews site
Lines: 2
Message-ID: <cancel.3C2D2007.AD251D51 at optonline.net>
NNTP-Posting-Host: 211.57.49.2
X-Trace: news2.kornet.net 1009774914 27193 211.57.49.2 (31 Dec 2001 05:01:54 GMT)
X-Complaints-To: usenet at news2.kornet.net
NNTP-Posting-Date: Mon, 31 Dec 2001 05:01:54 +0000 (UTC)
X-No-Archive: yes
X-Unac4ncel: yes
X-Commentary: I love NewsAgent 1.10 and the Sandblaster Cancel Engine Build 74 (19 March 1999)

This message was cancelled from within Mozilla.



More information about the Python-list mailing list