Board index » delphi » Ole Exception " The Server threw an exception"

Ole Exception " The Server threw an exception"

Hello,

  If anyone using Word 2002 SaveAs method, please be careful. The interface
has changed , the new SaveAs method is defined as SaveAs2000 for Word XP.

cheers
sanjay

 

Re:Ole Exception " The Server threw an exception"


Quote
>   If anyone using Word 2002 SaveAs method, please be careful. The
interface
> has changed , the new SaveAs method is defined as SaveAs2000 for Word XP.

I believe the interface still maps correctly, provided you import the type
library from 97 or 2000.  There are plenty of this sort of change of
commands for each version of Word.

Oliver Townshend

Re:Ole Exception " The Server threw an exception"


I am using Word XP, should I use Saveas or Saveas2000. Let me come to my
question for which I have banged my head against the wall so many time. here
goes -
I am getting a "The Server threw an exception" as this point in code

FileName, FileFormat: OleVariant;
FileName := 'c:\test.doc';
FileFormat := $0000000A;
OleCont.OleObject.SaveAs2000(FileName, FileFormat);

Now when I do a saveas either as text or as filtered html which is built
into Word XP, I get the above mentioned error. This error cuts across all
platforms i.r Win98 - All patches applied as well as Win 2000 and Win xp. I
am at a loss to understand what can be the solution for this. Can anybody
help me?
This error is random, it may happen 3-4  times out of 10-15 times usage.

SaveAs or SaveAs2000 does not solve the problem.

cheers
sanjay

Quote
"Oliver Townshend" <oli...@zip.com.au> wrote in message

news:3e521b10@newsgroups.borland.com...
Quote
> >   If anyone using Word 2002 SaveAs method, please be careful. The
> interface
> > has changed , the new SaveAs method is defined as SaveAs2000 for Word
XP.

> I believe the interface still maps correctly, provided you import the type
> library from 97 or 2000.  There are plenty of this sort of change of
> commands for each version of Word.

> Oliver Townshend

Re:Ole Exception " The Server threw an exception"


<<Sanjay Netrabile:
This error is random, it may happen 3-4  times out of 10-15
times usage.

Quote

I have not experienced this problem. Do you have any macros
that do anything when a document is saved?

--
Deborah Pate (TeamB) http://delphi-jedi.org

  TeamB don't see posts sent via Google or ISPs
  Use the real Borland server: newsgroups.borland.com
  http://www.borland.com/newsgroups/genl_faqs.html

Re:Ole Exception " The Server threw an exception"


Nope, no macros!

and it happens only at the SaveAs command. I save the doc file as html as
well as text. I tried interchanging the order, i.e Text first and then Html
and vice versa but it still throws the error at the first SaveAs command
irrespective of saving as Text or Html.

cheers
sanjay

"Deborah Pate (TeamB)" <d.p...@blueyonder.co.not-this-bit.uk> wrote in
message news:VA.00001b58.042a527f@blueyonder.co.not-this-bit.uk...

Quote
> <<Sanjay Netrabile:
> This error is random, it may happen 3-4  times out of 10-15
> times usage.

> I have not experienced this problem. Do you have any macros
> that do anything when a document is saved?

> --
> Deborah Pate (TeamB) http://delphi-jedi.org

>   TeamB don't see posts sent via Google or ISPs
>   Use the real Borland server: newsgroups.borland.com
>   http://www.borland.com/newsgroups/genl_faqs.html

Other Threads