Attribute VB_Name = "NewMacros" Sub ToTxt() ' ' ToTxt Macro ' Macro to save the open file in the plain text format. ' 'ChangeFileOpenDirectory "H:\_phd\background\writeup\bib\" Dim fileName ActiveDocument.Activate fileName = Replace(ActiveDocument.Name, ".rtf", ".bib") fileName = ActiveDocument.Path & "\" & fileName ActiveDocument.SaveAs fileName:=fileName, FileFormat:=wdFormatText, _ LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _ :="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _ SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _ False, Encoding:=1252, InsertLineBreaks:=False, AllowSubstitutions:=False _ , LineEnding:=wdCRLF End Sub