Problem with custom toolbar in custom template 
Author Message
 Problem with custom toolbar in custom template

Hi all,
I am preparing a custom template (My.dot). Users will
create new documents from this template by double-clicking
it or right-click and select "new".

The template creates a custom toolbar using:
  Dim cb As CommandBar
  Set cb = Application.CommandBars.Add(BarName, msoBarTop,
False, True)
and some buttons... This code is triggered from:
  Private Sub document_new() in ThisDocument.

Ok, so toolbar loads fine when creating a new doc.

Problem: when user quits word, he/she is prompted "Do you
want to save the changes you made to My.dot?"

Question: How do I code around this?

/A



Sun, 16 Oct 2005 19:55:44 GMT  
 Problem with custom toolbar in custom template
Try to implement following
ActiveDocument.AttachedTemplate.Saved = True

If doesn't remedy, repost and perhaps detail a bit more

Krgrds,
Perry



Quote:
> Hi all,
> I am preparing a custom template (My.dot). Users will
> create new documents from this template by double-clicking
> it or right-click and select "new".

> The template creates a custom toolbar using:
>   Dim cb As CommandBar
>   Set cb = Application.CommandBars.Add(BarName, msoBarTop,
> False, True)
> and some buttons... This code is triggered from:
>   Private Sub document_new() in ThisDocument.

> Ok, so toolbar loads fine when creating a new doc.

> Problem: when user quits word, he/she is prompted "Do you
> want to save the changes you made to My.dot?"

> Question: How do I code around this?

> /A



Sun, 16 Oct 2005 22:07:05 GMT  
 Problem with custom toolbar in custom template
Hi Perry,
that's how I finally worked around (?) the issue...

Thanks for your quick answer!

/A

Quote:
>-----Original Message-----
>Try to implement following
>ActiveDocument.AttachedTemplate.Saved = True

>If doesn't remedy, repost and perhaps detail a bit more

>Krgrds,
>Perry



>> Hi all,
>> I am preparing a custom template (My.dot). Users will
>> create new documents from this template by double-
clicking
>> it or right-click and select "new".

>> The template creates a custom toolbar using:
>>   Dim cb As CommandBar
>>   Set cb = Application.CommandBars.Add(BarName,
msoBarTop,
>> False, True)
>> and some buttons... This code is triggered from:
>>   Private Sub document_new() in ThisDocument.

>> Ok, so toolbar loads fine when creating a new doc.

>> Problem: when user quits word, he/she is prompted "Do
you
>> want to save the changes you made to My.dot?"

>> Question: How do I code around this?

>> /A

>.



Sun, 16 Oct 2005 20:44:26 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. create custom icon,custom combobox in custom toolbar

2. create custom icon,custom combobox(to insert values)in custom toolbar

3. Copying custom toolbar to another template

4. how to add tooltips to custom buttons on custom toolbar

5. VB4-32 Toolbar Custom control Problem

6. Problems with VB4 Toolbar Custom Control

7. Problems with: Toolbar Custom Control in VB 4.0 for Win 95

8. Outlook custom form print to word template

9. Loading custom form info into a Word template (OL 2002)

10. VBA: Copy Import map from custom template to Global.mpt

11. How to create a template with custom properties

12. Custom Template Installation

 

 
Powered by phpBB® Forum Software