M
malycom
Hi
I have a toolbar menu item that opens a user form where a user can select a
template to use.
I choose to close all documents before running the form which works fine so
long as there is a document open. If there are no documents open and it is
just the Word application itself, it throws an error.
Can you tell me what code to add as a check to this bit of code that will
get this to work.
This is the affected bit of code.
Private Sub UserForm_Initialize()
Documents.Close
With ListBox1
.AddItem "Termination With No Assets"
.AddItem "Blank Letter"
End With
End Sub
Any help is great appreciated.
Thanks in advance
Malcolm
I have a toolbar menu item that opens a user form where a user can select a
template to use.
I choose to close all documents before running the form which works fine so
long as there is a document open. If there are no documents open and it is
just the Word application itself, it throws an error.
Can you tell me what code to add as a check to this bit of code that will
get this to work.
This is the affected bit of code.
Private Sub UserForm_Initialize()
Documents.Close
With ListBox1
.AddItem "Termination With No Assets"
.AddItem "Blank Letter"
End With
End Sub
Any help is great appreciated.
Thanks in advance
Malcolm