Re: [python-win32] PythonWin And Excel Problem

2006-12-01 Thread Michael S
Andrea, Also, could it be that when you do the following: sheet.Range("A1:A10").Value = therand you actually initialize all 10 cells to the first element of the array? Try to iterate and initialize every cell separately. Michael --- Andrea Gavana <[EMAIL PROTECTED]> wrote: > Hi All, > > I

Re: [python-win32] PythonWin And Excel Problem

2006-12-01 Thread Michael S
First of all you should call the random.seed() function. That was at least what I´ve always done. seed([x]) Initialize the basic random number generator. Second of all, calling random.random() will give you this: random() Return the next random floating point number in the range [0.0, 1.0

[python-win32] MS Word

2006-10-03 Thread Michael S
Good day all. Does anyone have experience in appending multiple word file into one big file? I have a directory full of word files and I want to make one file out of all of them. I tried to google it, in order at least to see it how it's done in VBA, but haven't found any good examples. Michael _

[python-win32] printing to PDF

2006-09-25 Thread Michael S
sleep(2)    self.word_app.Documents(self.dir_name+doc_file).Close()My problem is that I am prompted for a file name for every pdf file being printed, even though I supply one. Is there a way to avoid the File Save dialog popping up?Thanks in advance.- Original Message From: Michael S <

Re: [python-win32] How to force late binding/Solved

2006-09-25 Thread Michael S
Thanks for you help.The problem apparentely was in the parenthesis. I dropped the parenthesis from GetPDDoc and things started to work!- Original Message From: Simon Dahlbacka <[EMAIL PROTECTED]>To: Michael S <[EMAIL PROTECTED]>Sent: Monday, September 25, 2006 11:10:16 A

Re: [python-win32] AVDoc and PDDoc/How to force late binding

2006-09-25 Thread Michael S
Message From: Simon Dahlbacka <[EMAIL PROTECTED]>To: Michael S <[EMAIL PROTECTED]>Cc: Justin Ezequiel <[EMAIL PROTECTED]>; python-win32@python.orgSent: Monday, September 25, 2006 10:56:13 AMSubject: Re: [python-win32] AVDoc and PDDoc/How to force late bindingEnsureModule forces *

Re: [python-win32] AVDoc and PDDoc/How to force late binding

2006-09-25 Thread Michael S
... However when I run the script, I get an com_error saying that dynamic.py couldn't find a certain method? I thought that EnsureModule should force late binding. - Original Message From: Michael S <[EMAIL PROTECTED]> To: Justin Ezequiel <[EMAIL PROTECTED]>; python-win32@python

Re: [python-win32] AVDoc and PDDoc

2006-09-24 Thread Michael S
Thanks a lot Justin. I tried running your code, for some reason it just hangs. I wonder why. - Original Message From: Justin Ezequiel <[EMAIL PROTECTED]> To: python-win32@python.org Sent: Sunday, September 24, 2006 9:52:18 PM Subject: Re: [python-win32] AVDoc and PDDoc > From

[python-win32] (no subject)

2006-09-23 Thread Michael S
Good day all. I am trying to write a short Python script to create some PDFs. I create instances of App, AVDoc and PDDoc using the following syntax: app = Dispatch("AcroExch.App") doc = Dispatch("AcroExch.AVDoc") pd = Dispatch("AcroExch.PDDoc") However when I call pd = doc.GetPDDoc(), the Python