Re: can't open word document after string replacements

2006-10-25 Thread Duncan Booth
Frederic Rentsch <[EMAIL PROTECTED]> wrote: > DOC files contain housekeeping info which becomes inconsistent if you > change text. Possibly you can exchange stuff of equal length but that > wouldn't serve your purpose. RTF files let you do substitutions and they > save a lot of space too. But I

Re: can't open word document after string replacements

2006-10-24 Thread Frederic Rentsch
Antoine De Groote wrote: > Hi there, > > I have a word document containing pictures and text. This documents > holds several 'ABCDEF' strings which serve as a placeholder for names. > Now I want to replace these occurences with names in a list (members). I > open both input and output file in bi

Re: [OT] Re: can't open word document after string replacements

2006-10-24 Thread Richie Hindle
[Antoine] > I have a word document containing pictures and text. This documents > holds several 'ABCDEF' strings which serve as a placeholder for names. > Now I want to replace these occurences with names in a list (members). [Bruno] > I don't know how it's named in english, but in french it's (w

Re: can't open word document after string replacements

2006-10-24 Thread Steve Holden
Antoine De Groote wrote: > Bruno Desthuilliers wrote: > >>Antoine De Groote wrote: >> >>>Hi there, >>> >>>I have a word document containing pictures and text. This documents >>>holds several 'ABCDEF' strings which serve as a placeholder for names. >>>Now I want to replace these occurences with nam

[OT] Re: can't open word document after string replacements

2006-10-24 Thread Bruno Desthuilliers
Antoine De Groote wrote: > Bruno Desthuilliers wrote: >> Antoine De Groote wrote: >>> Hi there, >>> >>> I have a word document containing pictures and text. This documents >>> holds several 'ABCDEF' strings which serve as a placeholder for names. >>> Now I want to replace these occurences with name

Re: can't open word document after string replacements

2006-10-24 Thread Antoine De Groote
Bruno Desthuilliers wrote: > Antoine De Groote wrote: >> Hi there, >> >> I have a word document containing pictures and text. This documents >> holds several 'ABCDEF' strings which serve as a placeholder for names. >> Now I want to replace these occurences with names in a list (members). > > Do yo

Re: can't open word document after string replacements

2006-10-24 Thread Antoine De Groote
Thank you all for your comments. I ended up saving the word document in XML and then using (a slightly modified version of) my script of the OP. For those interested, there was also a problem with encodings. Regards, antoine -- http://mail.python.org/mailman/listinfo/python-list

Re: can't open word document after string replacements

2006-10-24 Thread Jon Clements
Antoine De Groote wrote: > Hi there, > > I have a word document containing pictures and text. This documents > holds several 'ABCDEF' strings which serve as a placeholder for names. > Now I want to replace these occurences with names in a list (members). I > open both input and output file in bin

Re: can't open word document after string replacements

2006-10-24 Thread Bruno Desthuilliers
Antoine De Groote wrote: > Hi there, > > I have a word document containing pictures and text. This documents > holds several 'ABCDEF' strings which serve as a placeholder for names. > Now I want to replace these occurences with names in a list (members). Do you know that MS Word already provides

Re: can't open word document after string replacements

2006-10-24 Thread Daniel Dittmar
Antoine De Groote wrote: > I have a word document containing pictures and text. This documents > holds several 'ABCDEF' strings which serve as a placeholder for names. > Now I want to replace these occurences with names in a list (members). I > open both input and output file in binary mode and

can't open word document after string replacements

2006-10-24 Thread Antoine De Groote
Hi there, I have a word document containing pictures and text. This documents holds several 'ABCDEF' strings which serve as a placeholder for names. Now I want to replace these occurences with names in a list (members). I open both input and output file in binary mode and do the transformation