BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Word installed, but automation doesn't work

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Crazy Horse's crazier lit
Guest





PostPosted: Tue Aug 23, 2005 2:00 pm    Post subject: Word installed, but automation doesn't work Reply with quote



One of the apps I've created for people here allow them to print out
schedules using Word. The problem is, it works on some computers but not on
others--even when Word is installed on them.

What could be causing that? An out-of-date .DLL? The version of Word they're
using? Or...?

--

Download Blackbird Crow Raven's book
"STILL CASTING SHADOWS: Two American Families 1620-2006"
(.exe and .pdf): http://cc.borland.com/ccweb.exe/listing?id=23106


Back to top
Patrick
Guest





PostPosted: Tue Aug 23, 2005 8:45 pm    Post subject: Re: Word installed, but automation doesn't work Reply with quote



Quote:
What could be causing that? An out-of-date .DLL? The version of Word
they're using? Or...?

What errors are you getting, if any?

Are you using early or late binding?
(I'm a late binding kind of guy so I'll be useless in that case. Only near
useless otherwise.)



Back to top
Crazy Horse's crazier lit
Guest





PostPosted: Tue Aug 23, 2005 9:11 pm    Post subject: Re: Word installed, but automation doesn't work Reply with quote



"Patrick" <pdc (AT) novusprintmedia (DOT) com> wrote

Quote:

What errors are you getting, if any?


Call was rejected by callee

AV at address <157 Riverside Avenue> in module 'oleaut32.dll' Write of
address <8675309e9e9>

The remote procedure call failed

Quote:
Are you using early or late binding?
(I'm a late binding kind of guy so I'll be useless in that case. Only near
useless otherwise.)

I'm in a bind most of the time, but in this case, late.

I think when they only have the problem when Word is already open when
invoked by my code. Do I need to kill any active Word processes before
invocation?

--

Download Blackbird Crow Raven's book
"STILL CASTING SHADOWS: Two American Families 1620-2006"
(.exe and .pdf): http://cc.borland.com/ccweb.exe/listing?id=23106



Back to top
Patrick
Guest





PostPosted: Tue Aug 23, 2005 9:30 pm    Post subject: Re: Word installed, but automation doesn't work Reply with quote

Quote:
Call was rejected by callee
AV at address <157 Riverside Avenue> in module 'oleaut32.dll' Write of
address <8675309e9e9
The remote procedure call failed
Interesting. I get remote procedure call errors using Excel if I overlap to

open methods (and don't give Excel time to close in between), never get an
good AV info out of the deal though...

Quote:
I'm in a bind most of the time, but in this case, late.

I think when they only have the problem when Word is already open when
invoked by my code. Do I need to kill any active Word processes before
invocation?
No--how are you getting your object? This works (with Outllook in this case)

running or not:
try
oOutlook := GetActiveOleObject('Outlook.Application') ;
except
oOutlook := CreateOleObject('Outlook.Application') ;
end;



Back to top
Carl Caulkett
Guest





PostPosted: Tue Aug 23, 2005 9:53 pm    Post subject: Re: Word installed, but automation doesn't work Reply with quote

Crazy Horse's crazier little brother wrote:

Quote:
"Patrick" <pdc (AT) novusprintmedia (DOT) com> wrote in message
news:430b8ae0$1 (AT) newsgroups (DOT) borland.com...

What errors are you getting, if any?


Call was rejected by callee

AV at address <157 Riverside Avenue> in module 'oleaut32.dll' Write
of address <8675309e9e9

The remote procedure call failed

Hi Clay,

I'm not an expert on this but I know that Deborah has recommended
running the Word executable with a command line switch for various
problems.

OK. I've just googled for one of her messages. Try running:

Winword.exe /regserver

from the appropriate office sub-folder.

--
Carl

Back to top
Crazy Horse's crazier lit
Guest





PostPosted: Wed Aug 24, 2005 1:51 pm    Post subject: Re: Word installed, but automation doesn't work Reply with quote

"Patrick" <pdc (AT) novusprintmedia (DOT) com> wrote

Quote:
No--how are you getting your object? This works (with Outllook in this
case) running or not:
try
oOutlook := GetActiveOleObject('Outlook.Application') ;
except
oOutlook := CreateOleObject('Outlook.Application') ;
end;

I use OfficePartner components.
....
var
MainDoc: TOpWordDocument;
.. . .
MainDoc := OpWord.OpenDocument(Format('%s%s.doc', [sPath,
DAILY_SCHEDULE_GroupHome]));

(OpWord is a TOPWord component)
--

Download Blackbird Crow Raven's book
"STILL CASTING SHADOWS: Two American Families 1620-2006"
(.exe and .pdf): http://cc.borland.com/ccweb.exe/listing?id=23106



Back to top
Patrick
Guest





PostPosted: Wed Aug 24, 2005 1:56 pm    Post subject: Re: Word installed, but automation doesn't work Reply with quote

Quote:
I use OfficePartner components.
I have no idea on how those work or if they would cause an issue. Sorry.




Back to top
Nikolay
Guest





PostPosted: Sat Aug 27, 2005 6:58 am    Post subject: Re: Word installed, but automation doesn't work Reply with quote


Hello, the problems could be many but I will mention some here.

1. If you execute just the print icon
commandbars.item['Sstandard'].tonrolts.item['Print'].execute it will not always work because the ONACTION property of this icon may be set by a third party to call other procedure or function from God knows where.

2. If you execute just print methods and have no printers installed you will be getting an exception.

3. if you have printers sach as FAX MODEMS than you will get a problem approching them this way and I still don't know a solution to it.

Nikolay

"Carl Caulkett" <carlca (AT) dircon (DOT) co.uk> wrote:
Quote:
Crazy Horse's crazier little brother wrote:

"Patrick" <pdc (AT) novusprintmedia (DOT) com> wrote in message
news:430b8ae0$1 (AT) newsgroups (DOT) borland.com...

What errors are you getting, if any?


Call was rejected by callee

AV at address <157 Riverside Avenue> in module 'oleaut32.dll' Write
of address <8675309e9e9

The remote procedure call failed

Hi Clay,

I'm not an expert on this but I know that Deborah has recommended
running the Word executable with a command line switch for various
problems.

OK. I've just googled for one of her messages. Try running:

Winword.exe /regserver

from the appropriate office sub-folder.

--
Carl


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.