Windows 7 环境中的 PowerBuilder 10.5,使用 MS Office 2010 进行 ole 控制时出现网络打印机问题
我进行了所有以下迁移,
- 从 PowerBuilder 9 到 PowerBuilder 10.5
- Windows XP 到 Windows 7
- MS Office 97 和 MS Office 2003 到 MS Office 2010
从 PowerBuilder 应用程序,我们正在执行以下操作
- 邮件合并文档
- 打印文档
- 通过电子邮件发送附件,
例如该功能是自动化的,我们正在从应用程序中使用。这里我们使用 OLE 控件来处理 MS Office 功能。
问题是
在它开始工作前 3 周,我的意思是下面的代码。
ole_1.object.application.ActivePrinter = i_s_letterenvelops_printer
之后他们将服务器从一个位置转移到另一个位置。
而且我也不知道我的开发机器。
在这种情况下,我该如何处理?
请帮我解决这个问题。
谢谢!
I did all the follwoing migartion,
- from PowerBuilder 9 to PowerBuilder 10.5
- Windows XP to Windows 7
- MS Office 97 and MS Office 2003 to MS Office 2010
From the PowerBuilder application, we are doing the following things
- MailMerging the documents
- Printing the documents
- Emailing with attachments
like this functionalities are automated and we are using from the application. Here the OLE control we are using to handle MS Office functionalities.
The problem is
3 weeks before it was working i meant the below code .
ole_1.object.application.ActivePrinter = i_s_letterenvelops_printer
after that they Shifted the servers to one location to another location.
and also i didn't know about my development machine..
In this case, how can i handle this ?
Please help me about this.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许打印机名称已更改?例如,我的网络打印机名称类似于
SERVER-NAME 上的 PRINTER-NAME
。另请注意,它们区分大小写。在我们的应用程序中,我们在尝试使用打印机名称之前检查它是否存在。如果不存在,我们会显示一条消息,告诉用户联系该打印机的帮助台。您可以使用PrintGetPrinters
获取可用的打印机名称。添加20110629:
对于应用程序来说,网络打印机名称类似于
\\SERVER-NAME\PRINTER-NAME
。一种快速检查方法是将以下行放入您的应用程序中:
messagebox("PrintGetPrinters", printgetprinters(), Information!, OK!)
Perhaps the printer names have changed? For example, my network printer names are like
PRINTER-NAME on SERVER-NAME
. Also note they are case-sensitve. In our application we check if the printer name exists before we try to use it. If it's not there we show a message telling the user to contact the helpdesk about that printer. You can get the available printer names withPrintGetPrinters
.Added 20110629:
To the application the network printer name looks like
\\SERVER-NAME\PRINTER-NAME
.A fast way to check is to put this line in your application:
messagebox("PrintGetPrinters", printgetprinters(), Information!, OK!)
我的情况是,网络组最近将打印机配置文件更改为基于网络,这导致应用程序无法创建 PDF 文件。
我的电脑上的打印机列表看起来和以前一模一样:
这些打印机名称存储在一个数组中。问题在于,一个字符 (13) 被神奇地添加到了 Adobe PDF 行的末尾。为了解决这个问题,我在添加打印机之前删除了 char(13)(如果存在)。
它解决了我的问题。
环境: - Windows 7 - PowerBuilder 12.6
My situation was that the Network Group recently changed the printer profile to a network based which caused the application could not create PDF files.
The list of printers on my PC looked exactly the same as before:
These printer names were stored in an array. The problem was that a char (13) was magically added to the end of the Adobe PDF line. To solve the problem, I remove the char(13) if it exists before I add the printer.
It solved my problem.
Environment: - Windows 7 - PowerBuilder 12.6