I never tried the third solution. My guess on your problems is: the exact point where the files are created has been changed some times between various versions of pywin. You need write-access.

I geneally do not like my installed and distributed programms to generate code on the client machine - and, as nice it sounds with solution 3  - it adapts to all versions of typelibs; BUT are you really sure that Word 2003 is API-Compatible to Word XP ?

So for my apps I allways go with the "build specific typelib and bundle that" (Solution 2). If I support more then 1 version, (like W2003 and WXP, I bundle both typelibs and import accordingly.

(sth like:

if (installedversionofoffice is xp):
   import wordxp as word
elif (installedversionofoffice is 2k3):
  import word2k3 as word

that "(installedversionofoffice is xp)" is up for you to code ... I used some lines fom makepy.py and changed them accordingly.


2006/1/24, Ivan Horvath <pillesoft@yahoo.co.uk>:
Ciao Harald,

     thank you for your answer.
     it seems that solution 2 is working for me, but i cannot manage
     solution 3. though i think this would be the best solution.

     can you help me how i can manage this dynamic generation?

Tuesday, January 24, 2006, 10:57:12 AM, you wrote:

HAM> http://starship.python.net/crew/theller/moin.cgi/IncludingTypelibs

HAM> 2006/1/24, Ivan Horvath <pillesoft@yahoo.co.uk>:Ciao py2exe-users,

HAM> i made a small tool which converts an ms word document to
HAM> another one.
HAM> i use the msword constants made by makepy.py utility.

HAM> when i compile my tool to an exe i cannot access any constant, seems
HAM> they are not existing.

HAM> when i make a print vars( win32com.client.constant) it lists nothing.

HAM> what is the problem? how do i have to import the constants?

HAM> --
HAM> Best regards,
HAM>  Ivan
HAM>  mailto: pillesoft@yahoo.co.uk
HAM> http://pillesoft.freeweb.hu

HAM> -------------------------------------------------------
HAM> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
HAM> for problems?Stop!Download the new AJAX search engine that makes
HAM> searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!
HAM> http://sel.as-us.falkag.net/sel?cmd=lnk kid=103432 bid=230486 dat=121642
HAM> _______________________________________________
HAM> Py2exe-users mailing list
HAM> Py2exe-users@lists.sourceforge.net
HAM> https://lists.sourceforge.net/lists/listinfo/py2exe-users

Best regards,

GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart