>I perform the menu cleanup during document's close event,
> however the menus are explicitly saved with the document.
>
> How can I avoid this?
>
> Thanks, Jan.
Are you adding your menus to the menu bar? if so, Reset the menu bar and all
your customisations will be gone and can be recreated next time.

Signature
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
Jan Kucera - 09 May 2006 14:46 GMT
> Are you adding your menus to the menu bar? if so, Reset the menu bar and
> all your customisations will be gone and can be recreated next time.
Hi Jonathan. This is what I'm trying to do, but how can I avoid saving the
menus in the document during save? I use CommandBars("mymenu").Delete in the
document_close, and the menu disappears, however when I open the doc file I
see the menus are included. I need to avoid this since menus can be
recreated any time and saved holds about 7MB....
Jonathan West - 09 May 2006 15:06 GMT
>> Are you adding your menus to the menu bar? if so, Reset the menu bar and
>> all your customisations will be gone and can be recreated next time.
[quoted text clipped - 4 lines]
> file I see the menus are included. I need to avoid this since menus can be
> recreated any time and saved holds about 7MB....
Did you set the CustimizationContext to the document containing the menu
immediately before deleting?

Signature
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
Jan Kucera - 09 May 2006 16:03 GMT
Nope, what it should be set?
> Did you set the CustimizationContext to the document containing the menu
> immediately before deleting?
Jonathan West - 09 May 2006 16:26 GMT
> Nope, what it should be set?
It should be set to the template or document containing the toolbar that is
being changed.

Signature
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