[python-win32] I've RTFM'd (Help Excel Macro Removing)

Jorgensen, Jens jens.jorgensen@tallan.com
Tue, 29 Jan 2002 15:12:02 -0600


I have office 2000 as well and it should be there. I used oleview to 
look at the type library directly and even tried it out in code:

from win32com.client import Dispatch
xl = Dispatch('excel.application')
wkbk = xl.Workbooks.Add()
module = wkbk.Modules.Add()
print module.Name

This gets me:

Module1

Sayed A. Kooshesh wrote:

>Hmm, That's Intersting, I'm using Excel 2000 (excel objlib 9.0) and I don't
>have a modules property of the Workbook object...
>-Ari
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>What's the difference between fate and destiny?
>
>Your destiny is determined by your actions.
>Your fate is determined by your destiny.
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>-----Original Message-----
>From: Jorgensen, Jens [mailto:jens.jorgensen@tallan.com]
>Sent: Monday, January 28, 2002 3:34 PM
>To: Sayed A. Kooshesh
>Cc: python-win32@python.org
>Subject: Re: [python-win32] I've RTFM'd (Help Excel Macro Removing)
>
>
>Interesting. It seems that the Modules property of the Workbook object
>is supposed to contain the modules of code which are in the workbook.
>However I tried this and it didn't work! That is, I recorded a macro,
>then went into the VB macro editor to see that the module was there (it
>was named "Module1") and then looked at Modules.Count and it was zero! I
>then used the Add() method on the Modules interface and that worked and
>added a module as expected. Very weird. I have no idea why this doesn't
>work as expected.
>
>Sayed A. Kooshesh wrote:
>
>>Hey All,
>>
>>My project currently is cleaning a couple hundred (and Quite Large) Excel
>>Sheets that were generated by another employee using a VB Macro. Problem
>>
>is,
>
>>for every .xls he created, it copied the Macro onto it, showing all his
>>code, and adding a good 500k to the file size. I've been hunting hard with
>>my COM Browser and I've done quite a few net searches, but I can't find
>>anything that really points to it. I just would like to remove them from
>>
>the
>
>>workbook. Please Help!
>>
>>-Ari
>>
>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>What's the difference between fate and destiny?
>>
>>Your destiny is determined by your actions.
>>Your fate is determined by your destiny.
>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>>
>>
>>_______________________________________________
>>Python-win32 mailing list
>>Python-win32@python.org
>>http://mail.python.org/mailman/listinfo/python-win32
>>
>
>
>--
>Jens B. Jorgensen
>jens.jorgensen@tallan.com
>
>
>
>_______________________________________________
>Python-win32 mailing list
>Python-win32@python.org
>http://mail.python.org/mailman/listinfo/python-win32
>


-- 
Jens B. Jorgensen
jens.jorgensen@tallan.com