Jacek Pliszka wrote:
> Hi!
>
> I have something like this:
>
> wrd=Dispatch("Word.Application")
> doc=wrd.Documents.Open('test.doc')
> for j in doc.Tables:
> s=unicode(j)
> ... here I do a few searches on the date inside the table ....
>
> How can I do it without the method I mentioned ? I use it here to be
> able to do s=unicode(j).
>
You're relying on a bunch of automatic conversions here, some of which
do conversions that you don't want.
"j" is not a string here -- it is a Table object. The default property
of the Table object is a Range object. The default property of the
Range object is the Text object, which IS a Unicode string. So, instead
of relying on the default conversions, if you say this explicitly:
for j = doc.Tables
xxx = j.Range.Text
you'll find that xxx *IS* a Unicode string.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32