Hi mbk,
Using your code in Word 2003 and 2010, I'm unable to reproduce a run-time 4605 error unless the selection is somewhere other than where an endnote legitimately can be inserted.
The absence of some descriptive text in the first error message is disconcerting - and it makes troubleshooting rather difficult. I've tweaked the code somewhat, but I'm not sure that'll resolve the problem:
Code:
Sub InsertEndnote()
With Selection
If .StoryType <> wdMainTextStory Then Exit Sub
.Start = .Words.Last.Start
.End = .Words.Last.End
If .Characters.Last = " " Then .End = .End - 1
.Collapse wdCollapseEnd
.Endnotes.Add Range:=.Range
With .EndnoteOptions
If .Location <> wdEndOfDocument Then .Location = wdEndOfDocument
If .NumberingRule <> wdRestartContinuous Then .NumberingRule = wdRestartContinuous
If .StartingNumber <> 1 Then .StartingNumber = 1
If .NumberStyle <> wdNoteNumberStyleArabic Then .NumberStyle = wdNoteNumberStyleArabic
End With
End With
End Sub