Free Support Forum - aspose.com

Created Word document failing to open on some machines

We’re using the Aspose.Word to create reports in word from template documents. We got it up and running fine on our enviroment. However, the client is getting errors trying to open the file generated by Word itself (All our in office machines, plus home computers download/open fine). They are trying to download to a 2000 machine with office 2000, it a new computer so no other versions are on it, and I’m posting the document in code using the document.save to the response object.

Any help,
Tim

Hi,

Thank you for considering Aspose.

Sorry Tim but you have not provided enough information about the problem.

1. Please describe what errors the clients are getting.
2. Post the document causing the issue.
3. Post the snippet of the code that operates on the document.

ok, Here you go. We’ve tested in on alot of machines, and it works on all but at our client’s location. Could it be a security issue on there network? Or might i need to save the doc locally then redirect them to the file for download (We’d like to avoid this).
1.)
illegal instruction (word) gets fired during opening

2.) See attachment

3.)
The code is too much to post so here is a short copy.

Dim oFileName as String = “AI.doc”
Dim FilePath as String = Request.MapPath("/include/docs/")

'Load Template
Dim tDoc as new Document(System.IO.Path.Combine(FilePath, WORDDOC_NAME))
.
.
.
Dim builder as new DocumentBuilder(tDoc)
.
.
.
'Whole bunch of these.
builder.MoveToMergeField(“BookTitle”)
builder.Write(dtr(“Title”))
.
.
.
dstDoc.MailMerge.DeleteFields()
oDoc.Save( oFileName, SaveFormat.FormatDocument, SaveType.OpenInWord, Response)

If this happens for one client only and works for all others then this is definitely not an Aspose.Word failure but some problems with that client’s machine/network configuration, or even Word itself. Sorry it is very hard to say what’s actually going on there because the template seems to be proper and your code looks correct.

Just to make sure:

1. Check which version of Aspose.Word you are using and download the latest if needed (currently 2.5).

2. Your template contains some floating images and text boxes. It works fine with Aspose.Word 2.5 and MS Word 2003 but you probably try to make the images inline and remove the textboxes just to check if it helps.