The issue is that ActiveDocument refers to the dotm file itself, not the document being opened. Try changing ActiveDocument to ThisDocument in your SaveDoc sub.