473,216 Members | 1,351 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,216 software developers and data experts.

Office Automation and late binding

I am sorry for this but I am not getting an answer elsewhere so I thought I
would try here.

It seems the safer way to go prior to deployment is to change my early
binding to late binding to prevent lots of issues occuring, especially those
on Office versions other than mine. (I have 2003). such as

Public WordApp As Object = CreateObject("Word.Application")
Public oDoc As Object = CreateObject("Word.Document")

instead of

'Public WordApp As New Word.Application
'Public oDoc As Word.Document
This occured because late last night a client reported this error

http://support.microsoft.com/default...b;en-us;292744

Does this mean I can remove the references to the Word object library and
such?

I have run into one issue concerning this.

When I tried to do

Public dlg as Object = Creatobject("Word.Dialog")

instead of

'Public dlg As Word.Dialog

it says it cannot create the active x component. How shall I use late
binding with this?

I much appreciate your answers
Nov 20 '05 #1
8 1515
"scorpion53061" <Its the end of the world as we know it@here.com>
schrieb

I have run into one issue concerning this.

When I tried to do

Public dlg as Object = Creatobject("Word.Dialog")

instead of

'Public dlg As Word.Dialog

it says it cannot create the active x component. How shall I use
late binding with this?


A Word.Dialog is not createable this way, just like you also can't write

dlg = NEW Word.Dialog

You must get the Dialog object from any property of the creatable objects,
like Word.Application. It's Dialogs property returns Dialog objects.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
> You must get the Dialog object from any property of the creatable objects,
like Word.Application. It's Dialogs property returns Dialog objects.

Armin,

In your opinion is it okay to mix early binding and late binding in the same
application?
Nov 20 '05 #3
"scorpion53061" <Its the end of the world as we know it@here.com>
schrieb
You must get the Dialog object from any property of the creatable
objects, like Word.Application. It's Dialogs property returns
Dialog objects.

Armin,

In your opinion is it okay to mix early binding and late binding in
the same application?

I don't know. Probably I won't.

But, (why) do you think it would t solve the problem?
--
Armin

Nov 20 '05 #4
> But, (why) do you think it would t solve the problem?

It did solve the problem.

I was wondering because I have other objects that are taking so long to load
with late binding but were working okay for the client that I didnt want to
switch them over to late binding if I didnt have to.
Nov 20 '05 #5
"scorpion53061" <Its the end of the world as we know it@here.com>
schrieb
But, (why) do you think it would t solve the problem?


It did solve the problem.

??

Your problem was that Creatobject("Word.Dialog") does not work. Now, using
early binding,

New Word.Dialog

works? I don't think so.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #6
> Your problem was that Creatobject("Word.Dialog") does not work. Now, using
early binding,

New Word.Dialog

works? I don't think so.


Armin,

You are jumping to conclusions or something. I want to keep early binding
for other unrelated database issues.

You should relax a little bit.
Nov 20 '05 #7
"scorpion53061" <Its the end of the world as we know it@here.com>
schrieb
Your problem was that Creatobject("Word.Dialog") does not work.
Now, using early binding,

New Word.Dialog

works? I don't think so.


Armin,

You are jumping to conclusions or something. I want to keep early
binding for other unrelated database issues.

You should relax a little bit.


Me? I relax from time to time.
<you>
I have run into one issue concerning this.

When I tried to do

Public dlg as Object = Creatobject("Word.Dialog")

instead of

'Public dlg As Word.Dialog

it says it cannot create the active x component. How shall I use late
binding with this?
</you>

<me>
A Word.Dialog is not createable this way, just like you also can't write

dlg = NEW Word.Dialog
</me>

<you>
is it okay to mix early binding and late binding in the same
application
</you>

I thought you were referring to my answer (referring to your question
concerning Creatobject("Word.Dialog")). That's why I thought you mean that
mixing early and late binding could solve the problem. You wrote that it
did. As I could (and can) not imagine that it really did, I asked again. If
you were not referring to the initial problem, _you_ have been jumping, not
me. :-)
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #8
> I thought you were referring to my answer (referring to your question
concerning Creatobject("Word.Dialog")). That's why I thought you mean that
mixing early and late binding could solve the problem. You wrote that it
did. As I could (and can) not imagine that it really did, I asked again. If you were not referring to the initial problem, _you_ have been jumping, not me. :-)


Armin,

No I said "jumping to conclusions". Your suggestion was fine for the word
dialog problem. I simply assigned it to the objects event though no
intellisense would help me. There are other issues involved with late
binding, automation and database handling.

I try to keep other issues that i am dealing with out of the question at
hand. My goal is to prevent confusion. But in this case it muddled things
more.

Anyway plesae look in on the thread
Re: removing non traditional text

I would value your input.
Nov 20 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: zfeld | last post by:
1. Where do I get the Office 2003 PIAs? On the MSDN download site there are only downloads for XP office PIAs. Do they automatically get installed to the GAC with the installation of office 2003? ...
3
by: NQuinn | last post by:
I loaded an access application, which was created and runs fine on Office 2000, onto a computer with Office XP. The application creates a run-time error when running a procedure that creates a new...
13
by: Rolf | last post by:
I have Office97Pro, Office2000Premium and OfficeXP Pro all installed. I'm creating an Access97 application for another person and need to set a reference to Microsoft Office 8.0 Object Library....
6
by: Steve | last post by:
What would happen if an Access97 database had a reference to Microsoft Office 10 library (but only used Access97 stuff) and it was run on a machine that only had Access97 and correspondingly only...
4
by: dave | last post by:
I have an Access 97 application running quite happily in Windows 2000. If I upgrade a machine to Windows 2000 SP4 then I get an error in one area which is this - I use Automation to run an instance...
3
by: pontifikas | last post by:
I've created some code, manipulating an Excel application. Unfortunately this does not work on systems with Other Office distros than Office XP. Is there something I can do to ensure...
2
by: Max | last post by:
I am using late binding to automate my code to Microsoft Outlook and I'm getting an error in my code: Type objClassType = Type.GetTypeFromProgID("Outlook.Application"); objApp_Late =...
5
by: John | last post by:
Hi I need to call methods from office apps from my vb.net app. Some of my clients are still on office 2000 so to maintain compatibility I can not use office 2003 PIA. Can I avoid the whole PIA...
6
by: Excel 009 | last post by:
Hi, In my office I have Office 2003 on the PC. I created an Access application which has a component reference to Microsoft Office 12.0 Object Library. The problem that I am having now it...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.