A
Anne P.
I have some questions about creating AutoText entries. This is going to be long-winded so bear with me, because there is a very specific reason for doing this.
I have been using the following code using two input boxes to create AutoText entries, and either assign that entry to an existing category (such as Mailing Instructions) or create a new category (such as Stamps).
Public Sub CreateNewAutoText()
Dim strATName As String
Dim strATCategory As String
'Get the AutoText Name
Dim Message, Title
Message = "Enter the name for the AutoText Entry" ' Set prompt.
Title = "Create AutoText Entry" ' Set title.
strATName = InputBox(Message, Title)
'Get the AutoText Category
Dim atMessage, atTitle
Message = "Enter the category for the AutoText Entry" ' Set prompt.
Title = "Create AutoText Entry" ' Set title.
strATCategory = InputBox(atMessage, atTitle)
Selection.CreateAutoTextEntry strATName, strATCategory
End Sub
This has worked very well, using input boxes. I have now set it up with a userform (which basically works the same as the above). Following is the code for the userform:
Public strATCategory As String
Public strATName As String
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
Selection.CreateAutoTextEntry strATName, strATCategory
Unload Me
End Sub
Private Sub txtATCategory_Change()
strATCategory = txtATCategory.Text
End Sub
Private Sub txtATName_Change()
strATName = txtATName.Text
End Sub
Using either of the above methods, an AutoText entry is created in Normal.dot. This is fine for most users on the network, however, I would like to extend the macro for IT staff so that when they create a new AutoText entry that should be firmwide, it can be created in their global template (currently SKGlobal.dot) and distributed to users, without overwriting the user's Normal.dot.
I know that most consultants recommend locking down Normal.dot (making it read only), but if you do this, you disable any customization on the user's part. They cannot create new AutoText, formatted AutoCorrect, Macros, or custom toolbars. This slows productivity on their part. What I do for my clients is create a new template that all new documents are based on (i.e., SKBlank.dot). The File, New menu option and the blank document icon on the standard toolbar (and the Word icons on the desktop or Programs menu) are remapped so that all new documents not based on another template (such as letter, memo, fax, etc) are based on this template rather than on Normal.dot. This way, the users can have access to store customizations of their own in Normal.dot.
I would like to extend the above userform for the IT staff at the company to create new AutoText entries in their global template (in this case, SKGlobal.dot) rather than in Normal.dot.
I have done some testing with the above procedures. They both work very well for creating AutoText entries in Normal.dot, with the name you specify and creating a new category if needed. All new entries created are stored in Normal.dot. However, if I then try to copy the new entries to the SKGlobal.dot, they are copied in a different way. Each entry is copied with the name of the AutoText entry as a category and as an AutoText entry under that category with the same name. For example, I previously created AutoText entries named Draft and Draft Autodate under the category Stamps, which was stored in Normal.dot. If I use the Organizer to copy those entries into SKGlobal.dot, then choose Insert, AutoText, I will see a category in the drop down list named Draft, which has an AutoText entry named Draft and a Category named Draft Autodate, which has an AutoText entry named Draft Autodate.
Is there anyway when using either of the above methods of creating new AutoText entries that I can specify the template that the AutoText should be stored in?
Sorry for the long-winded message, but I am desparate here.
Anne
I have been using the following code using two input boxes to create AutoText entries, and either assign that entry to an existing category (such as Mailing Instructions) or create a new category (such as Stamps).
Public Sub CreateNewAutoText()
Dim strATName As String
Dim strATCategory As String
'Get the AutoText Name
Dim Message, Title
Message = "Enter the name for the AutoText Entry" ' Set prompt.
Title = "Create AutoText Entry" ' Set title.
strATName = InputBox(Message, Title)
'Get the AutoText Category
Dim atMessage, atTitle
Message = "Enter the category for the AutoText Entry" ' Set prompt.
Title = "Create AutoText Entry" ' Set title.
strATCategory = InputBox(atMessage, atTitle)
Selection.CreateAutoTextEntry strATName, strATCategory
End Sub
This has worked very well, using input boxes. I have now set it up with a userform (which basically works the same as the above). Following is the code for the userform:
Public strATCategory As String
Public strATName As String
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
Selection.CreateAutoTextEntry strATName, strATCategory
Unload Me
End Sub
Private Sub txtATCategory_Change()
strATCategory = txtATCategory.Text
End Sub
Private Sub txtATName_Change()
strATName = txtATName.Text
End Sub
Using either of the above methods, an AutoText entry is created in Normal.dot. This is fine for most users on the network, however, I would like to extend the macro for IT staff so that when they create a new AutoText entry that should be firmwide, it can be created in their global template (currently SKGlobal.dot) and distributed to users, without overwriting the user's Normal.dot.
I know that most consultants recommend locking down Normal.dot (making it read only), but if you do this, you disable any customization on the user's part. They cannot create new AutoText, formatted AutoCorrect, Macros, or custom toolbars. This slows productivity on their part. What I do for my clients is create a new template that all new documents are based on (i.e., SKBlank.dot). The File, New menu option and the blank document icon on the standard toolbar (and the Word icons on the desktop or Programs menu) are remapped so that all new documents not based on another template (such as letter, memo, fax, etc) are based on this template rather than on Normal.dot. This way, the users can have access to store customizations of their own in Normal.dot.
I would like to extend the above userform for the IT staff at the company to create new AutoText entries in their global template (in this case, SKGlobal.dot) rather than in Normal.dot.
I have done some testing with the above procedures. They both work very well for creating AutoText entries in Normal.dot, with the name you specify and creating a new category if needed. All new entries created are stored in Normal.dot. However, if I then try to copy the new entries to the SKGlobal.dot, they are copied in a different way. Each entry is copied with the name of the AutoText entry as a category and as an AutoText entry under that category with the same name. For example, I previously created AutoText entries named Draft and Draft Autodate under the category Stamps, which was stored in Normal.dot. If I use the Organizer to copy those entries into SKGlobal.dot, then choose Insert, AutoText, I will see a category in the drop down list named Draft, which has an AutoText entry named Draft and a Category named Draft Autodate, which has an AutoText entry named Draft Autodate.
Is there anyway when using either of the above methods of creating new AutoText entries that I can specify the template that the AutoText should be stored in?
Sorry for the long-winded message, but I am desparate here.
Anne