cool_go_blue wrote: > Thank you so much. It works. But where can I find the APIs such as > Dispatch vs gencache.EnsureDispatch? >
To a certain extent, this comes from on-the-job experience. It is described in the win32com documentation. There's also a couple of books on Python in Windows ("Python Programming on Win32" is one). > Now, I have another problem. Using the auto save, all auto-numbers > before paragraphs are not read by the following code: > > for word in doc.Content.Text.encode("cp1252", "replace").split(): > print word > count += 1 > print "total word: " , count > > It works for the manual saved txt file. > You aren't using "auto save" here. You are still reading the document directly from the application. The idea was, after you save the document as text, you go read that text file instead of using doc.Content.Text. You aren't THINKING about your problem. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32