2

Our ASP.NET/C# lets users edit and manage Word (OpenXML) documents that are hosted on a server. I am using client-side VBScript functions to handle some of the editing functions including saving the document to a folder on the server. For the save functionality, I am using the following function call :

Document.SaveAs "http://server/savefolder/savefile.docx" 

I have given "Full Control" permissions on savefolder to both the NETWORK SERVICE and the IUSR_MACHINE users. Yet the above call fails. The error number returned is 5096. The error message is some gibberish that doesn't make any sense.

The server is Windows 2003 and the IIS version is 6.0. I have installed the OpenXML SDK 2.0 CTP on the server.

I can successfully read and print documents.

Does anyone tell me what I am doing wrong? or what additional settings need to be in place?


BTW, the error message ("gibberish" from my post) is:

"EOALPHABETICARABICARABICABJADARABICALPHABAHTTEXTCAPSCARDTEXTCHARFORMATCHI"

No, I am not making this up!

1
  • It would help if you added the 'gibberish' reported by the error message.
    – Kev
    Feb 4, 2009 at 2:01

8 Answers 8

2

In my case, that error 5096 with description "EOALPHABETICARABICARABICABJADARABICALPHABAHTTEXTCAPSCARDTEXTCHARFORMATCHI" occurred when using VBA code in Access to drive a Word mail-merge. The cause was trying to save a document with the same name (including path) as an open document.

Error line:

objApp.ActiveDocument.SaveAs saveAsName 

where objApp is the object variable representing the Word application and saveAsName is the string variable storing the name I am trying to save the file as e.g. "C:\temp\testdoc.docx".

IF a file with the same name exists but is not open, the above code overwrites it silently.

3
  • If you have a follow up question you should post it as a new question, not as an answer to this old question. More people will read it since old questions are not frequented very much. The "Ask Question" button is in the top right.
    – sth
    Sep 19, 2009 at 15:23
  • Thanks sth. I don't have a follow-up question, I just added my comment in the spirit of information sharing. There were very few links when I googled the error number and description, so I added my knowledge to this old question. I don't need lots of people to see it, just people who are searching for this particular error number and description.
    – user175434
    Sep 22, 2009 at 8:47
  • Oh, right, you actually explain where that error comes from... Sorry, I obviously didn't read your posts thoroughly back then. Actually your answer probably shows the reason for the problem in the original question, unlike all the other "answers" in this thread.
    – sth
    Nov 7, 2009 at 16:30
1

Turns out WebDAV is not turned on by default in IIS 6.0. Once I turned it on, I was able to save the documents just fine.

Thanks for all your answers!

0

Just a guess... if the vbscript is running on the client, the code is probably running under the user's account, not under the server's IIS account. So unless you give write access to that user, vbscript probably won't work for this.

Since you're using ASP.NET, you could try writing a web service that takes in Word document data and saves it to the server for you.

0

I'd try running Fiddler on the client while trying to save the document to get a sense of what's really going on. I wonder if maybe it's trying to do an HTTP PUT (as opposed to a POST).

0

Have you given write access to the folder in IIS manager?

0

Is the save folder you're using outside of the websites root directory, i.e. 'hidden' from the internet?

0

Just to add to SI's information...

I also get this I get the 5096 - EOALPHABETICARABICARABICABJADARABICALPHABAHTTEXTCAPSCARDTEXTCHARFORMATCHI error when my code tries to save a MS Word document with the same name and to the same location as a Word document that is already open in another instance of Word.

Although not entirely relevant to this thread, I hope it may help someone else who stumbles upon this thread!

Regards, Duane,

0

this question is old but still active ? You save the file with a http://... url, i think you should save it with a file URL as

Document.SaveAs "\\server\savefolder\savefile.docx"  

Grtz

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.