That won't work. If you save as TXT, oDoc is then the text file that you have just saved.
To save the file as docx, you would either have to forget saving as txt and save as docx, or simply save oDoc instead of saving it as txt. e.g.
Code:
'strName = Left(oDoc.FullName, InStrRev(oDoc.FullName, ".") - 1) & ".txt"
'oDoc.Range.Font.Name = strFont
oDoc.Save
'oDoc.SaveAs2 FileName:=strName, FileFormat:=wdFormatUnicodeText
oDoc.Close SaveChanges:=wdDoNotSaveChanges
If you want it as txt as well as docx then
Code:
strName = Left(oDoc.FullName, InStrRev(oDoc.FullName, ".") - 1) & ".txt"
oDoc.Range.Font.Name = strFont
oDoc.Save
oDoc.SaveAs2 FileName:=strName, FileFormat:=wdFormatUnicodeText
oDoc.Close SaveChanges:=wdDoNotSaveChanges
Or SaveAs again e.g.
Code:
strName = Left(oDoc.FullName, InStrRev(oDoc.FullName, ".") - 1) & ".txt"
oDoc.Range.Font.Name = strFont
oDoc.SaveAs2 FileName:=strName, FileFormat:=wdFormatUnicodeText
strName = Left(oDoc.FullName, InStrRev(oDoc.FullName, ".") - 1) & ".docx"
oDoc.SaveAs2 FileName:=strName, FileFormat:=wdFormatXMLDocument
oDoc.Close SaveChanges:=wdDoNotSaveChanges