[RESOLVED] save as type: 97-2003 (*.doc)
Hello, I am looking for a way to save a word document as type: Word 97-2003 Document (*.doc). this is needed because some people are not using word 2007 and they a problem opening the file. What's the solution to this?
Thanks
at the moment I use this to save the file:
Code:
oDoc.SaveAs(strFileName)
Re: save as type: 97-2003 (*.doc)
Since I don't have MSO 07 at the moment but try this and you will be able to get the code that you want.
Start the macro and then save the file in "Word 97-2003 Document (*.doc)" format. you will get a code which you can then amend... you might get a code as shown below.
Code:
ActiveDocument.SaveAs FileName:="Sample.doc", FileFormat:=100, _
LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _
:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False
Re: save as type: 97-2003 (*.doc)
yes I got something similar to yours, from all of that I think only this bit is needed - 'FileFormat = wdFormatDocument' but I didn't find a way to amend that yet
thanks
Re: save as type: 97-2003 (*.doc)
Post the exact code that you got after recording the macro...
Re: save as type: 97-2003 (*.doc)
Sub Macro6()
'
' Macro6 Macro
'
'
ChangeFileOpenDirectory "C:\Users\AdminMGR\Desktop\"
ActiveDocument.SaveAs FileName:="Doc1.doc", FileFormat:=wdFormatDocument, _
LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _
:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False
ActiveWindow.Close
Application.Quit
End Sub
Re: save as type: 97-2003 (*.doc)
Try this in your actual project...
vb Code:
strFileName = "C:\Users\AdminMGR\Desktop\Doc1.doc"
oDoc.SaveAs FileName:=strFileName, FileFormat:=wdFormatDocument, _
LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _
:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False
Re: save as type: 97-2003 (*.doc)
how should I amend this bit - 'FileFormat:=wdFormatDocument'. it is giving me an error - 'name is not declared'
Re: save as type: 97-2003 (*.doc)
Try this
vb Code:
strFileName = "C:\Users\AdminMGR\Desktop\Doc1.doc"
oDoc.SaveAs FileName:=strFileName, FileFormat:=100, _
LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _
:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False
Re: save as type: 97-2003 (*.doc)
right, with this I can't open it myself anymore :)
Re: save as type: 97-2003 (*.doc)
Sorry I didn't get you? Can you attach a sample file which is saved using the above code?
1 Attachment(s)
Re: save as type: 97-2003 (*.doc)
Re: save as type: 97-2003 (*.doc)
I see what you mean... you can delete the file... Let me check that for you...
Re: save as type: 97-2003 (*.doc)
just need to find out what is the format code for MS word compatible version (2003), I am still trying to google it but...
Re: save as type: 97-2003 (*.doc)
Try with FileFormat:=0 instead of FileFormat:=100
Re: save as type: 97-2003 (*.doc)
yes this is working fine
thanks resolved