对象库的不同版本 [英] Different Versions of Object Libraries

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

问题描述

我的开发机器上有Access 2000和2003。我的客户端只有

Access 2000.当我为这个客户端开发时,我运行Access 2000.但是,我的

代码要求我有Microsoft Word对象库和Microsoft

参考文献中列出的Outlook对象库。


结果,在我的机器上,它们被列为版本11.0,然后,当我

上传文件,显示为缺失。所以我必须完成

删除引用的步骤,然后在客户端的机器上重新添加它们,以获得
版本9.0。显然这是一个我宁愿避免的痛苦。


我意识到我可以使用后期绑定。但是代码'已经写好了,而且我会给b $ b更喜欢不重写所有东西 - 至少在这一点上没有。


任何关于如何使这项工作无需不断删除

并重新添加库的想法?


谢谢。

I have Access 2000 and 2003 on my development machine. My client only has
Access 2000. When I develop for this client, I run Access 2000. However, my
code requires that I have the Microsoft Word Object Library and Microsoft
Outlook Object Library listed in References.

As I result, on my machine they''re listed as version 11.0, and then, when I
upload the file, they show as missing. So I have to go through the steps of
removing the references and then re-adding them on the client''s machine for
version 9.0. Obviously this is a bit of a pain I''d prefer to avoid.

I realize I could use late binding. But the code''s already written, and I''d
prefer not to have rewrite everything -- at least not at this point.

Any ideas for how I can make this work without having to continually remove
and re-add the libraries?

Thanks.

推荐答案

这里唯一现实的解决方案就是重新编写你的代码以进行延迟招标。


即使更新单词或放置软件在一台机器上,他们有一个

自定义安装的办公室可以打破你的代码。


这里没有太多我可以添加。


你有点像一个机械师,询问如何避免更换汽油。

汽车。


没有这里有一个合理的答案。


您可以100%控制目标上办公室的安装方式

机器。请记住,如果更改了
路径名,即使是具有相同版本办公室的机器也可能会中断。


你必须咬紧牙关。结果是代码不会破坏,如果单词

缺失,升级或是不同的版本。


改变到最近并不难捆绑。我总是使用

早期绑定开发以使代码正常工作,并且在

开发期间也具有实际意义。一旦代码工作,然后你将它翻转到最后

绑定。


-

Albert D. Kallal(访问MVP)

加拿大艾伯塔省埃德蒙顿
pl*****************@msn.com
The only realistic solution here is to re-write your code for late biding.

Even a update to word or placing you software on a machine where they had a
custom install of office can break you code.

There is not really much here I can add.

You kind of being like a mechanic who asking how to avoid changing oil in
the car.

There is just not a reasonable answer here.

Either you have 100% control over how office is installed on the target
machine. Remember, even machine with the SAME version office can break if
pathnames are changed.

You have to bite the bullet. The result is code that will not break if word
is missing, upgraded, or is a different version.

It really not that hard to change to late binding. I always develop using
early binding to get the code working, and also have inti-sense during
development. Once the code is working, then you flip it over to late
binding.

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com


如果你不使用后期绑定,那么你必须在你的开发机器上设置对旧的/ b $ b版本的Word / Outlook对象库的引用(即

你安装了较旧的Word / Outlook)。


所以,要么使用后期​​绑定;或者(当使用早期绑定时)开发针对

最旧版本的自动化服务器应用程序,如果您的应用程序必须自动化多个版本的自动化服务器应用程序,并希望新版本是与旧版本兼容的
(MS Office应用程序在向后兼容性方面很好)。


Phil Reynolds < ph ******* @ msn.com写信息

新闻:OF *************** @ newssvr17.news.prodigy.net 。 ..
If you do not use late binding, then you have to set reference to older
version of Word/Outlook object library on your developing machine (that is,
you have older Word/Outlook installed).

So, either use late binding; or (when using early binding) develop against
oldest version of automation server apps, if your app has to automate
multiple version of auotmation server apps, and hope the new version is
compatible to older version (MS Office apps are good on backward
compatibility).

"Phil Reynolds" <ph*******@msn.comwrote in message
news:OF***************@newssvr17.news.prodigy.net. ..

>我的开发机器上有Access 2000和2003。我的客户端只有Access 2000.当我为这个客户端开发时,我运行Access 2000.但是,我的
代码要求我列出Microsoft Word对象库和Microsoft
Outlook对象库在参考文献中。


结果,在我的机器上,它们被列为版本11.0,然后,当

我上传文件时,它们显示失踪。因此,我必须完成以下步骤

删除引用,然后在客户端的机器上重新添加它们

for 9.0。显然这是一个我宁愿避免的痛苦。


我意识到我可以使用后期绑定。但是代码'已经写好了,而且

我不想重写所有内容 - 至少在这一点上没有。


任何关于如何使这项工作无需不断地删除并重新添加库的想法?


谢谢。
>I have Access 2000 and 2003 on my development machine. My client only has
Access 2000. When I develop for this client, I run Access 2000. However, my
code requires that I have the Microsoft Word Object Library and Microsoft
Outlook Object Library listed in References.

As I result, on my machine they''re listed as version 11.0, and then, when
I upload the file, they show as missing. So I have to go through the steps
of removing the references and then re-adding them on the client''s machine
for version 9.0. Obviously this is a bit of a pain I''d prefer to avoid.

I realize I could use late binding. But the code''s already written, and
I''d prefer not to have rewrite everything -- at least not at this point.

Any ideas for how I can make this work without having to continually
remove and re-add the libraries?

Thanks.


9月25日上午9:54,Albert D. Kallal < PleaseNOOOsPAMmkal ... @ msn.com>

写道:
On Sep 25, 9:54 am, "Albert D. Kallal" <PleaseNOOOsPAMmkal...@msn.com>
wrote:

你必须咬紧牙关。结果是如果单词

缺失,升级或是不同的版本,代码将不会中断。
You have to bite the bullet. The result is code that will not break if word
is missing, upgraded, or is a different version.



我对Albert的知识深度和

体验的长度有一个健康的尊重。他说的所有内容都适用但并非所有时间都适用。


因此,开发涵盖所有场景的安全方法是做他所说的b $ b。


HOWEVER


如果你不想成为所有人的所有东西而且只有

特定的案例和具体问题,你不喜欢调整你的工作方式,运行两台机器,虚拟

(VirtualPC或VMWare)或物理,分开你的Office版本和

在交付之前测试你能做什么。


在这个时代,购买第二台物理机的成本
与我们在1990年或1985年开始时相比,
和软件非常低。

只要你支付
,运行虚拟机的成本就更低了足够的RAM和硬盘空间。

I have a healthy respect for Albert''s depth of knowledge and length of
experience. And all that he says applies but not all of the time.

So the safe way to develop to cover all scenarios is to do what he
says.

HOWEVER

If you are not trying to be all things to all people and only have a
specific case and a specific problem and you don''t like making
adjustments to how you are doing things, run two machines, virtual
(VirtualPC or VMWare) or physical, separate your Office versions and
test what you can before delivering.

In this day and age, the cost of acquiring a second physical machine
and software is VERY LOW compared to when we started in 1990 or 1985.
The cost of running a virtual machine is even lower as long as you
have enough RAM and hard disk space.


这篇关于对象库的不同版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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