OLE自动化Word 2013 [英] OLE Automation Word 2013

查看:128
本文介绍了OLE自动化Word 2013的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经实施了Office为德国工程领域的大型工业客户提供解决方案。< o:p>< / o:p>


在此解决方案中,oleAutomation用于生成Word文档。< o:p>< / o:p> ;


 


使用Word of Office 2010,这个工作正常。< o:p>< / o:p>


不幸的是,在使用Office 2013进行更新后,我们遇到了很多问题通过Word oleAutomation生成。在我们的第一次测试之后,似乎Word
2013比旧版本的Word更加异步。这导致不再正确生成文档。最后的文本块在开头突然出现,表格已损坏等。



我们的问题:是否存在Word OLE自动化的同步方法或设置,我们使用它可以确保OLE-macro语句同步运行,即一个接一个地执行。< o:p>< / o:p>


或者最终还有另一种解决方法。



我们完全使用.net技术迁移文档,但这需要重新设计,文档生成必须在此之前正常工作。



感谢任何提示



Axel Biewer< o:p>< / o:p>




axel&ute

解决方案

Hello Axel,


你在哪里自动化Wo申请?它是服务器机器吗?


你自动化Word的代码是什么?你运行另一个线程吗?


无论如何,我建议使用Open XML SDK,参见
欢迎使用Open XML SDK 2.5 for Office



We have implemented an Office solution for a large industrial customer in German engineering.<o:p></o:p>

In this solution oleAutomation is used to generate Word documents.<o:p></o:p>

 

With Word of Office 2010 this works fine.<o:p></o:p>

Unfortunately, after an update with Office 2013 we have big problems with the generation by Word oleAutomation. After our first tests, it seems that Word 2013 works much more asynchronously as older versions of Word. This causes that the documents are no longer correctly generated. Text blocks at the end come suddenly at the beginning, tables are corrupted etc.

Our question: is there a synchronization method or setting for Word OLE Automation, with which we can make sure that the OLE-macro statements run synchronously, i.e. carried out one after the other.<o:p></o:p>

Or is there here eventually another workaround.

We are migration the document generation completely with .net technology, but this needs a major redesign and the document generation must work correctly before this is done.

Thanks for any tip

Axel Biewer<o:p></o:p>


axel&ute

解决方案

Hello Axel,

Where do you automate the Word application? Is it a server machine?

What code do you for automating Word? Do you run another threads?

Anyway, I'd suggest using Open XML SDK instead, see Welcome to the Open XML SDK 2.5 for Office .


这篇关于OLE自动化Word 2013的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆