none
Save a file using an available FileConverter in Microsoft Office Interop RRS feed

  • Question

  • I have written the following code to get the list of converters.

      Word.FileConverters = myWordApplication.FileConverters;

    I do some searching for a particular converter from this list, and I get it....

     if(converter.ClassName == "MSWordMac4")

    Now with the given converter. I want to save the file with the given format. How do I do this ?

    Thursday, February 20, 2014 5:35 PM

Answers

  • Hello Sofia,

    You just need to use the Save or SaveAs2 methods of the Document class.

    As you probably know the FileConverter class from the Word Object Model doesn't provide any methods. It is for information purposes only. For example, you may check the CanSave and CanOpen properties for checking if the specified file converter is designed to save files or it is designed to open files (or for both).

    File converters are used by Word internally. You are not allowed to add your own on the fly.

    • Proposed as answer by Marvin_Guo Monday, February 24, 2014 7:23 AM
    • Marked as answer by Marvin_Guo Monday, March 3, 2014 1:34 AM
    Thursday, February 20, 2014 6:25 PM

All replies

  • Hello Sofia,

    You just need to use the Save or SaveAs2 methods of the Document class.

    As you probably know the FileConverter class from the Word Object Model doesn't provide any methods. It is for information purposes only. For example, you may check the CanSave and CanOpen properties for checking if the specified file converter is designed to save files or it is designed to open files (or for both).

    File converters are used by Word internally. You are not allowed to add your own on the fly.

    • Proposed as answer by Marvin_Guo Monday, February 24, 2014 7:23 AM
    • Marked as answer by Marvin_Guo Monday, March 3, 2014 1:34 AM
    Thursday, February 20, 2014 6:25 PM
  • Thank you Eugene.

    The response is helpful.

    I am using one of the existing Converters, which is installed with Office 2007. I was able to get hold to that converter, and It has "CanSave" property. Now I want to do a save with that particular converter.

    I query the format from it. How do I call the save on my current document ?

    Friday, February 21, 2014 8:29 AM
  • As I already wrote in my previous message here:

    You just need to use the Save or SaveAs2 methods of the Document class.

    Friday, February 21, 2014 8:44 AM