Created
September 30, 2019 05:07
-
-
Save GroupDocsGists/aa13f2abc182802de634edeefaf38e34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string outputDirectory = @"C:\output"; | |
string pageFilePathFormat = Path.Combine(outputDirectory, "page_{0}.html"); | |
MemoryStream attachmentStream = new MemoryStream(); | |
using (Viewer viewer = new Viewer("sample.msg")) | |
viewer.SaveAttachment("attachment-word.doc", attachmentStream); | |
using (Viewer viewer = new Viewer(() => attachmentStream)) | |
{ | |
HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources(pageFilePathFormat); | |
viewer.View(options); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment