Word 2007 VBA -- Need to use code cleaner?

G

Gary Hillerson

I've been periodically running VBA Code Cleaner on my macro templates
for a bunch of years.

Should I/Can I use the code cleaner with Word 2007 development?

thanks,
gary
 
T

Tony Jollans

I'm sure you can continue to use it - VBA hasn't changed - but I don't know
what it does so can't say if you should :)
 
J

Jonathan West

Gary Hillerson said:
I've been periodically running VBA Code Cleaner on my macro templates
for a bunch of years.

Should I/Can I use the code cleaner with Word 2007 development?

I'm not sure whether the 2007 file format suffers from template bloat in the
way that the earlier file format did. It's a bit early to tell. From what I
know of the new file format, it ought not to suffer in the same way, in
which case the code cleaner would no longer be needed. But I'm not yet
prepared to say that it *won't* be needed.

If you have converted your templates into the new file format, I suggest you
don't bother with the code cleaner for now, and see if you have any
problems. And I would be very interested in your experiences, so do please
post back sometime and let us know.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
G

Gary Hillerson

I'm not sure whether the 2007 file format suffers from template bloat in the
way that the earlier file format did. It's a bit early to tell. From what I
know of the new file format, it ought not to suffer in the same way, in
which case the code cleaner would no longer be needed. But I'm not yet
prepared to say that it *won't* be needed.

If you have converted your templates into the new file format, I suggest you
don't bother with the code cleaner for now, and see if you have any
problems. And I would be very interested in your experiences, so do please
post back sometime and let us know.

Well, i've been toiling heavily in the new template format since
mid-November, and haven't seen problems yet. And ya gotta love how
much smaller the files are.

It seems like it should be safe to run Code Cleaner, since I believe
it simply exports each form, class, and module to saved files, deletes
everything, then re-imports each.

But for the meantime, i'm going to skip it and will keep my eye on the
template file size and behavior. I'll post here if i spot any
problems.
 
J

Jonathan West

It seems like it should be safe to run Code Cleaner, since I believe
it simply exports each form, class, and module to saved files, deletes
everything, then re-imports each.

That is pretty much what it does. There should be no harm in running the
code cleaner once to see what happens. Make sure you make a copy of the
templates first, just in case.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
T

Tony Jollans

It seems like it should be safe to run Code Cleaner, since I believe
it simply exports each form, class, and module to saved files, deletes
everything, then re-imports each.

Nothing obvious has changed in the way VBA is saved. Inside the new xml
files it is still held in a structured storage format so I would expect the
same issues as before to exist and for this tool to achieve the same as
before. Bloat, of course, may not be so obvious in a zipped file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top