L
Luc
Hello,
I'm just confused by this 'temporary' thing.
I would like to add a CommandBarControl to the Menu Bar in Word, but it should be 'deleted' when Word closes. So I use "temporary=True". However when I close Word and restart it. That commandBarControl is still there?
Why is my CommandBarControl still available after Word is restarted (using temporary=true)?
' Code starts here
Sub Add()
Dim MyControl As CommandBarControl
Dim strMacroName As String
Set MyControl = CommandBars.ActiveMenuBar.Controls.Add(msoControlPopup, _
Before:=2, _
Temporary:=True)
MyControl.Caption = "MyCaption"
End Sub
' Code ends here
I know how to delete the CommandBarControl but what's the purpose of "temporary" if it is persistant?
I'm just confused by this 'temporary' thing.
I would like to add a CommandBarControl to the Menu Bar in Word, but it should be 'deleted' when Word closes. So I use "temporary=True". However when I close Word and restart it. That commandBarControl is still there?
Why is my CommandBarControl still available after Word is restarted (using temporary=true)?
' Code starts here
Sub Add()
Dim MyControl As CommandBarControl
Dim strMacroName As String
Set MyControl = CommandBars.ActiveMenuBar.Controls.Add(msoControlPopup, _
Before:=2, _
Temporary:=True)
MyControl.Caption = "MyCaption"
End Sub
' Code ends here
I know how to delete the CommandBarControl but what's the purpose of "temporary" if it is persistant?