Private Sub Document_new(
Dim temp As Intege
Dim newButton As CommandBarButto
temp = MsgBox("Would you like to activate the Ciba Issue Table Tool?" & Chr(13) & "By clicking 'Yes' the tool will be added to your Tools menu." & Chr(13) & "For support please see the 'About' section.", vbQuestion + vbYesNo + vbDefaultButton2, "Ciba"
If temp = vbYes The
'Setting Popup Menu in default Tools men
Set newItem = CommandBars("Tools").Controls.Add(Type:=msoControlPopup, Before:=1, Temporary:=True
With newIte
.BeginGroup = Tru
.Caption = "Ciba
.Tag = "Ciba
End Wit
'Adding ControlButtons to new Popu
Set newButton = newItem.Controls.Add(Type:=msoControlButton, Temporary:=True
With newButto
.Caption = "Add New Issue
.FaceId =
.OnAction = "NewIssue
End Wit
Set newButton = newItem.Controls.Add(Type:=msoControlButton, Temporary:=True
With newButto
.Caption = "Update Issue Table
.FaceId =
.OnAction = "Summary
End Wit
Set newButton = newItem.Controls.Add(Type:=msoControlButton, Temporary:=True
With newButto
.Caption = "Update TOC
.FaceId =
.OnAction = "UpdateTOC
End Wit
Set newButton = newItem.Controls.Add(Type:=msoControlButton, Temporary:=True
With newButto
.BeginGroup = Tru
.Caption = "About
.FaceId =
.OnAction = "About
End Wit
End I
End Su
Private Sub Document_Close(
ActiveDocument.AttachedTemplate.Saved = Tru
Dim synCtrl As CommandBarContro
'Deleting popup in container applicatio
Set synCtrl = CommandBars("Tools").FindControl(Type:=msoControlPopup, Tag:="Ciba"
On Error GoTo NoPopu
synCtrl.Delet
NoPopup
En
End Su
Private Sub Document_Open(
Dim temp As Intege
Dim newButton As CommandBarButto
temp = MsgBox("Would you like to activate the Ciba Issue Table Tool?" & Chr(13) & "By clicking 'Yes' the tool will be added to your Tools menu." & Chr(13) & "For support please see the 'About' section.", vbQuestion + vbYesNo + vbDefaultButton2, "Ciba"
If temp = vbYes The
'Setting Popup Menu in default Tools men
Set newItem = CommandBars("Tools").Controls.Add(Type:=msoControlPopup, Before:=1, Temporary:=True
With newIte
.BeginGroup = Tru
.Caption = "Ciba
.Tag = "Ciba
End Wit
'Adding ControlButtons to new Popu
Set newButton = newItem.Controls.Add(Type:=msoControlButton, Temporary:=True
With newButto
.Caption = "Add New Issue
.FaceId =
.OnAction = "NewIssue
End Wit
Set newButton = newItem.Controls.Add(Type:=msoControlButton, Temporary:=True
With newButto
.Caption = "Update Issue Table
.FaceId =
.OnAction = "Summary
End Wit
Set newButton = newItem.Controls.Add(Type:=msoControlButton, Temporary:=True
With newButto
.Caption = "Update TOC
.FaceId =
.OnAction = "UpdateTOC
End Wit
Set newButton = newItem.Controls.Add(Type:=msoControlButton, Temporary:=True
With newButto
.BeginGroup = Tru
.Caption = "About
.FaceId =
.OnAction = "About
End Wit
End I
End Su
----- Jean-Guy Marcil wrote: ----
Hi cw
I do not remember the post you are referring to... I browse through a fe
NG... ;-
If you have done so already, could you be so kind as to post all the cod
contained in your template. If you feel there is too much code, start by th
This_Document class module
I have seen this problem many times, and always have been able to correc
the situation. Usually, you want to pin down all the events that cause
changes to your template, thus prompting Word to ask if you want to save i
or not
Once you have pinpointed the said events, then you either save the templat
right after the event has occurred or you make Word believe it has bee
saved.
--
Cheers!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org
cw said:
I have created a template and when i create a document based on the
template and then save the document i am asked if i want to save the
template. Then when i close the document i am asked if i want to save
changes to xxxxx.dot.
Can i get rid of either of these or both?
I have seen some code in an earlier answer (Jean-Guy Marcil) and tried
that but it doesn't have any effect.