![]() |
#1
|
|||
|
|||
![]() I try such code for converting docx to doc format: Code:
Sub ToDoc() Application.Run MacroName:="FileSaveWord11" End Sub |
#2
|
||||
|
||||
![]()
Without knowing what the macro FileSaveWord11 is it is difficult to comment, however the following will save an existing document as DOC format - however be aware that DOC foirmat is not fully compatible with some later elements of DOCX format.
Code:
Sub SaveAsDOC() Dim sPath As String ActiveDocument.Save sPath = Replace(ActiveDocument.FullName, ".docx", ".doc") ActiveDocument.SaveAs2 FileName:=sPath, FileFormat:=wdFormatDocument97 End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
![]()
This code gives error: runtime error 438 Object doesn't support this property of method. Have to use "SaveAs Filename" instead of "SaveAs2 FileName" for working.
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Weboh | Word VBA | 5 | 12-10-2016 03:07 PM |
how to convert .wps to .doc | ret_squid | Word | 1 | 08-11-2016 09:03 PM |
![]() |
GrantSaw | Word | 3 | 01-28-2015 11:04 AM |
Convert .ost to .pst | phoy | Outlook | 1 | 12-03-2011 07:07 PM |
![]() |
Hinmini | PowerPoint | 1 | 10-28-2011 07:38 PM |