A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Command failed and other spurious errors



 
 
Thread Tools Display Modes
  #1  
Old November 12th, 2004, 06:02 PM
Alfons Puig
external usenet poster
 
Posts: n/a
Default Command failed and other spurious errors

Hi,

Using javascript we manage word documents that are in another IE frame. It
works, except sometimes that we get very ununderstandable errors. For
example:

a) Today we get a 'command failed' error on a oDocument.SaveAs(sFile,0)
statement. Why?
b) Sometimes the sequence:
oDocument.SaveAs(sFileTmp,0);
oDocument.SaveAs(sFile,0);
bFlag = oDocument.Saved;
retains sFileTmp in use (other applications can't open it) and bFlag is
false. Why?
c) Sometimes executing bFlag = oDocument.Saved; throws an exception, but the
message is blank. Why?

Thanks,

Alfons



  #2  
Old November 16th, 2004, 06:37 PM
Cindy M -WordMVP-
external usenet poster
 
Posts: n/a
Default

Hi Alfons,

In case you hadn't noticed, you've posted this in an end-user newsgroup. Little
chance of getting an automation question answered in here! If I had a concrete
idea, I'd tell you, but I have no experience with javascript or IE. Command
failed basically means that Word is unable to perform the actin in its current
state. At the moment, I can't imagine what could cause SaveAs to fail, unless
you're passing an invalid path or file name.

If that's not the case, then I recommend you take a look at the list of
office.developer newsgroups, read some of the messages, then post to the group
that seems most appropriate.

Using javascript we manage word documents that are in another IE frame. It
works, except sometimes that we get very ununderstandable errors. For
example:

a) Today we get a 'command failed' error on a oDocument.SaveAs(sFile,0)
statement. Why?
b) Sometimes the sequence:
oDocument.SaveAs(sFileTmp,0);
oDocument.SaveAs(sFile,0);
bFlag = oDocument.Saved;
retains sFileTmp in use (other applications can't open it) and bFlag is
false. Why?
c) Sometimes executing bFlag = oDocument.Saved; throws an exception, but the
message is blank. Why?


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

  #3  
Old November 17th, 2004, 04:55 PM
Alfons Puig
external usenet poster
 
Posts: n/a
Default

Hi Cindy,

When the error is produced I display all the variables, and the Path and
filename are both correct. I have also posted the same message to other
newsgroups (oleinterop and application.errors) without success (for the
moment).

"Cindy M -WordMVP-" escribió:

Hi Alfons,

In case you hadn't noticed, you've posted this in an end-user newsgroup. Little
chance of getting an automation question answered in here! If I had a concrete
idea, I'd tell you, but I have no experience with javascript or IE. Command
failed basically means that Word is unable to perform the actin in its current
state. At the moment, I can't imagine what could cause SaveAs to fail, unless
you're passing an invalid path or file name.

If that's not the case, then I recommend you take a look at the list of
office.developer newsgroups, read some of the messages, then post to the group
that seems most appropriate.

Using javascript we manage word documents that are in another IE frame. It
works, except sometimes that we get very ununderstandable errors. For
example:

a) Today we get a 'command failed' error on a oDocument.SaveAs(sFile,0)
statement. Why?
b) Sometimes the sequence:
oDocument.SaveAs(sFileTmp,0);
oDocument.SaveAs(sFile,0);
bFlag = oDocument.Saved;
retains sFileTmp in use (other applications can't open it) and bFlag is
false. Why?
c) Sometimes executing bFlag = oDocument.Saved; throws an exception, but the
message is blank. Why?


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:28 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.