B
barharborboy
Hi folks,
I create script/storyboards for the development of custom Web Based
Training courses. I have a team of writers and keeping course
terminologies standardized is always a problem. I am attempting to
write a macro that will add new terms to the scripting template and
will be accessed from the AutoText drop down menu. I am applying a
unique paragraph style so that they will be grouped together in the
AutoText menu.
I want to be able to do the following:
- Double-click on a word that I want to make a standard term.
- Apply a unique paragraph style to that term
- Copy the term name to the clipboard
- Add that term to the attached script template's Autotext entries
When the dialog opens, I Ctrl-V to paste in the term name. Currently,
I can do everything except get the Autotext to be stored in the
attached template. It goes into the Normal.dot.
Here's the code I'll cobbed together from examples listed here on this
group.
Sub CreateNewAutoText()
ActiveDocument.AttachedTemplate = "eLearning Storyboard template.dot"
Selection.Style = ActiveDocument.Styles("TechTerm")
Selection.Copy
Dim strATName As String
'Get the Autotext Name
Dim Message
Message = "Enter the name for the AutoText Entry" ' Set prompt.
strATName = InputBox(Message)
Selection.CreateAutoTextEntry strATName, strATCategory
End Sub
Does anyone know of another method, other than the CreateAutoTextEntry
method, to assign a new AutoText entry to an attached template?
I tried using the ThisDocument.AttachedTemplate.AutoTextEntries.Add
Name:=strATName, Range:=Selection.Range statement, but it gives an
error msg.
Any help would be greatly appreciated.
I create script/storyboards for the development of custom Web Based
Training courses. I have a team of writers and keeping course
terminologies standardized is always a problem. I am attempting to
write a macro that will add new terms to the scripting template and
will be accessed from the AutoText drop down menu. I am applying a
unique paragraph style so that they will be grouped together in the
AutoText menu.
I want to be able to do the following:
- Double-click on a word that I want to make a standard term.
- Apply a unique paragraph style to that term
- Copy the term name to the clipboard
- Add that term to the attached script template's Autotext entries
When the dialog opens, I Ctrl-V to paste in the term name. Currently,
I can do everything except get the Autotext to be stored in the
attached template. It goes into the Normal.dot.
Here's the code I'll cobbed together from examples listed here on this
group.
Sub CreateNewAutoText()
ActiveDocument.AttachedTemplate = "eLearning Storyboard template.dot"
Selection.Style = ActiveDocument.Styles("TechTerm")
Selection.Copy
Dim strATName As String
'Get the Autotext Name
Dim Message
Message = "Enter the name for the AutoText Entry" ' Set prompt.
strATName = InputBox(Message)
Selection.CreateAutoTextEntry strATName, strATCategory
End Sub
template, it defaults to Normal.From what I've read, the CreateAutoTextEntry method cannot select the
Does anyone know of another method, other than the CreateAutoTextEntry
method, to assign a new AutoText entry to an attached template?
I tried using the ThisDocument.AttachedTemplate.AutoTextEntries.Add
Name:=strATName, Range:=Selection.Range statement, but it gives an
error msg.
Any help would be greatly appreciated.