OpenOffice Word提供问题 [英] OpenOffice Word giving problem

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

问题描述

我正在尝试使用OpenOffice 3.1打开Office Word模板,并在从硬盘存储位置打开文档时使用数据库字段信息对其进行动态修改.
我正在用VB.net尝试这种功能性

但是问题是Bootstrap.biitstrap()挂起并允许在我部署到生产服务器上时执行下一行.

代码段:

I''m trying to use OpenOffice 3.1 for Opening the Office Word template as well as modifying it dynamically with Database fields information at the time of opening the document from my harddisk storage location.
I''m trying this finctionality with VB.net

But the problem is Bootstrap.biitstrap() hanging and allowing to execute next lines when i deployed on production server.

Code Snippet:

Dim objDocument As Object
Dim FileNameSource As String = "C:\SysReports\FaceSheet.doc"
Dim localContext As XComponentContext

Dim sUnoIni As String = "file:///C:/Program Files/OpenOffice.org 3/URE/bin/uno.ini"
localContext = Bootstrap.biitstrap()

Dim objServiceManager As unoidl.com.sun.star.lang.XMultiServiceFactory
objServiceManager = CType(localContext.getServiceManager(), XMultiServiceFactory)

Dim objDesktop As XComponentLoader
objDesktop = CType(objServiceManager.createInstance("com.sun.star.frame.Desktop"), XComponentLoader)

Dim openProps As PropertyValue() = New PropertyValue(0) {}
openProps(0) = New PropertyValue()
openProps(0).Name = "Hidden"
openProps(0).Value = New uno.Any(True)

Dim objDocument As XComponent

'Throwing Error from here
objDocument = objDesktop.loadComponentFromURL(PathConverter(FileNameSource), "_default", 0, openProps)



请帮助我解决此问题



Plz help me to resolve this

推荐答案

由于要将其部署到生产服务器,因此我假设您正在使用ASP.NET.
人们在做在本地工作,但在部署到生产服务器时却无法工作"的奇特的东西时,最常见的问题是他们忘记了服务器无法与他们的本地计算机通信,因此当您拥有c时: \ program files \无论如何,此文件都必须存在于服务器上,并且您需要具有访问权限.

在您的示例中,您需要在服务器上的位置C:\ SysReports中拥有一个名为FaceSheet.doc的文档,并且您的服务器需要安装OpenOffice.org.

是这样吗?
Since you are deploying this to a production server, I assume you are using ASP.NET.

The most common issue people have when doing fancy stuff that "works locally, but doesn''t work when deployed to the production server" is they forget that the server can''t talk to their local machine, therefore when you have c:\program files\whatever, this needs to exist on the server, and you need to have permissions to access it.

In your example, you need to have a document called FaceSheet.doc in the location C:\SysReports on your server, and your server needs OpenOffice.org installed.

Is this the case?


是的,它是一个Web应用程序,正如您所说的那样,文档路径也是在服务器上创建的.

为了不受任何限制地访问文档,我需要在Windows Server 2003上具有什么特定的权限角色?

谢谢,
Srinivas Kalagara
Yes you are correct.It''s an web application and as you said the document path is created on server too.

What specific permission role do i need to have on windows server 2003 inorder to access the document with out any restrictions?

Thanks,
Srinivas Kalagara


这篇关于OpenOffice Word提供问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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