Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here is a macro that I have taken from Andrew Pitonyak's Useful Macro Information For and modified to insert a macron. I have assigned Alt + H to it and it works for me without any problem.

'Author: Andrew Pitonyak
  Sub InsertMacron
  Dim oDoc As Object
  Dim oText As Object
  Dim oVCurs As Object
  Dim oTCurs As Object
  oDoc = ThisComponent
  oText = oDoc.Text
  oVCurs = oDoc.CurrentController.getViewCursor()
  oTCurs = oText.createTextCursorByRange(oVCurs.getStart())
  '  Place the text to insert here
  oText.insertString(oTCurs, "̄", FALSE)
 End Sub

Anyway, using a dedicated keyboard layout is a much better method.