D
Dave Neve
Hello,
Ideally, I'd now like to build a menu a bit like Words own automatic
insertion menu and have a list of prefixes, suffixes, morphs etc so that I
don't have to type them out all the time.
It would be great if the text has letters where the font size
increases/decreases to represent rising and falling tones of the language in
question. After reading, I think I need sth like
Sub InsertAutoTextEntry()
ActiveDocument.Content.Select
ActiveDocument.AttachedTemplate.AutoTextEntries("one").Insert _
Where:=Selection.Range, RichText:=False
End Subbut I know this is not quite right. I need to select the position of
the cursor (this is where I want to insert)and somehow I have then to select
the inserted word etc and apply one of my macros like
Sub LowShort()
Dim wordrange As Range, lrange As Range
Set wordrange = Selection.Range
Set lrange = wordrange.Duplicate
lrange.Collapse Direction:=wdCollapseEnd
lrange.InsertBefore "* "
wordrange.Underline = wdUnderlineSingle
wordrange.Font.Color = wdColorBrown
lrange.Font.Color = wdColorBrown
End Sub
So, for the moment, my two questions are
1 How do you select the cursor's position?
2 How do you select the word which has just been inserted without
selecting it manually?
As for building the menu with a list of prefixes etc in the tool bar, I
think I know more or less how to do that but we'll see when push comes to
the shove.
Any help appreciated.
Ideally, I'd now like to build a menu a bit like Words own automatic
insertion menu and have a list of prefixes, suffixes, morphs etc so that I
don't have to type them out all the time.
It would be great if the text has letters where the font size
increases/decreases to represent rising and falling tones of the language in
question. After reading, I think I need sth like
Sub InsertAutoTextEntry()
ActiveDocument.Content.Select
ActiveDocument.AttachedTemplate.AutoTextEntries("one").Insert _
Where:=Selection.Range, RichText:=False
End Subbut I know this is not quite right. I need to select the position of
the cursor (this is where I want to insert)and somehow I have then to select
the inserted word etc and apply one of my macros like
Sub LowShort()
Dim wordrange As Range, lrange As Range
Set wordrange = Selection.Range
Set lrange = wordrange.Duplicate
lrange.Collapse Direction:=wdCollapseEnd
lrange.InsertBefore "* "
wordrange.Underline = wdUnderlineSingle
wordrange.Font.Color = wdColorBrown
lrange.Font.Color = wdColorBrown
End Sub
So, for the moment, my two questions are
1 How do you select the cursor's position?
2 How do you select the word which has just been inserted without
selecting it manually?
As for building the menu with a list of prefixes etc in the tool bar, I
think I know more or less how to do that but we'll see when push comes to
the shove.
Any help appreciated.