Hi All,
I wanted to save my word file into text format using macro in word 2007.
Below snippet code for saving doc into text but we in below code we are giving path and i wanted to run this macro for any doc in any path.
I wanted to save my word file into text format using macro in word 2007.
Below snippet code for saving doc into text but we in below code we are giving path and i wanted to run this macro for any doc in any path.
Code:
Sub Macro4()
'
' Macro4 Macro
'
'
ChangeFileOpenDirectory "C:\Documents and Settings\User\Desktop\Reverend\"
ActiveDocument.SaveAs FileName:="Chapter 1.txt", FileFormat:=wdFormatText, _
LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _
:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False, Encoding:=65001, InsertLineBreaks:=False, AllowSubstitutions:= _
False, LineEnding:=wdCRLF
End Sub
Comment