COM file references
colinmeeks at rogers.com
Wed Feb 20 10:43:43 CET 2002
Please pardon me if I do a spelling mistake, but it's gone 4:30am and I need
to sleep :-)
You only need to pass the base file name, I.e. the bit without the
extension. You would
also make the program a bit more intelligent and check for trailing slashes
paths and double them up where necessary. This should get you on the right
P.S. Sorry if Outlook strews up the formatting.
def ConvertToText(UseFileName, UseInPath, UseOutPath):
#save file as text file - number '5' is position of word to text
#in the word 'file type' dialogue
w.ActiveDocument.SaveAs (UseOutPath+UseFileName+".txt", 5)
> However, I really need to turn this into a function to which I can pass an
> input file name and path, and an output file name and path.
> This is troubling me - however I try, I can't work out how to pass the
> and file to the 'Documents.Open' expression (or vice-versa)
> If anyone could offer any guidance I would really appreciate it. -
> for the astonishingly simple nature of the query!
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.324 / Virus Database: 181 - Release Date: 14/02/2002
More information about the Python-list