using System;
using Aspose.Words;
using Aspose.Words.Saving;

namespace ConvertWordToMarkdownInCsharp
{
    class Program
    {
        static void Main(string[] args)
        {
            // Use Aspose.Words license to remove trial version limitations after converting Word DOCX to Markdown
            License licenseForConvertingWordtoMarkdown = new License();
            licenseForConvertingWordtoMarkdown.SetLicense("Aspose.Words.lic");

            // Load input Word DOCX file with Document class
            Document doc = new Document("Input.docx");

            // Initialize MarkdownSaveOptions object
            MarkdownSaveOptions options = new MarkdownSaveOptions();
            options.UpdateFields = true;
            options.MemoryOptimization = true;            

            // Save the input word document to Markdown file
            doc.Save("SaveWordToMarkdown.md", options);
        }
    }
}