'''' This code is part of Document Solutions for Word demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsSystem.Collections.GenericImportsSystem.LinqImportsGrapeCity.Documents.Word '' This example shows how to convert markdown (.md) documents'' to MS Word DOCX and PDF formats.'''' The conversion is done by the WordRenderer class'' that uses the Markdig package written by Alexandre Mutel'' to parse markdown, and the DsWord OM to create MS Word documents from it.'''' The WordRenderer VB source code is included in this sample, to view it'' download the sample zip. The renderer sources are located'' in the MarkdownToWord subdirectory of the sample zip.PublicClassMd2WordFunctionCreateDocx(sampleParams AsString()) AsGcWordDocumentDim fn = Path.Combine(sampleParams(3).Split("/"c))Dim markdown = File.ReadAllText(fn)Return WordRenderer.ToWord(markdown)EndFunction FunctionCreateDocx(Optional parsIdx AsInteger = 0) AsGcWordDocumentReturnCreateDocx(GetSampleParamsList()(parsIdx))EndFunction PrivateSharedReadOnlys_paramsListAsNewList(OfString())() From {NewString() {"@md/DsPdfViewer README.md", "Convert the README.md file shipped with DsPdfViewer", Nothing,"Resources/Markdown/DsPdfViewer-README.md"},NewString() {"@md/DsPdfViewer CHANGELOG.md", "Convert the CHANGELOG.md file shipped with DsPdfViewer", Nothing,"Resources/Markdown/DsPdfViewer-CHANGELOG.md"},NewString() {"@md/spec.md", "Convert the Markdown specification spec.md file", Nothing,"Resources/Markdown/spec.md"} } PublicSharedFunctionGetSampleParamsList() AsList(OfString())Returns_paramsListEndFunctionEndClass