合并任何演示文稿 [英] merge any presentation
本文介绍了合并任何演示文稿的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我是b $ b我想构建一个允许我合并任何演示文稿的工具,或者有人可以删除代码示例。我找到了https://msdn.microsoft.com/en-us/library/office/ee361883(v = office.12).aspx 但我无法在Visual Studio 2017中编译它
Hello,
I want to build a tool that allows me to merge any presentation, or someone could drop a sample of the code. I found https://msdn.microsoft.com/en-us/library/office/ee361883(v=office.12).aspx but I can not compile this in Visual Studio 2017
请帮助
推荐答案
您好,
请使用
using (PresentationDocument fileName =
PresentationDocument.Open(presentationFolder + mergedPresentation, false))
{
// Validate the merged presentation.
OpenXmlValidator validator = new OpenXmlValidator();
var errors =
validator.Validate(fileName);
if (errors.Count() > 0)
{
Console.WriteLine("The merge process completed but the " +
"merged presentation failed to validate.");
Console.WriteLine("There are " + errors.Count() +
" errors:\r\n");
DisplayValidationErrors(errors);
}
else
Console.WriteLine("The merge process completed and the " +
"merged presentation validated with 0 errors.");
}
参考文献:
使用Open XML SDK 2.0验证Open XML文档
问候,
Celeste
这篇关于合并任何演示文稿的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文