We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Macro problem - long shot

I have a rather convoluted situation that I want to run past you.
We are using Aspose.Words to copy master documents to designated directories. These master documents contain macros that are set to fire when the copied document is openned.
For some reason, on certain computers in our company (regardless of the security level of the user signed onto the machine), the macro fails to run on the copied document, unless the user opens the macro code, changes it, saves it, closes the document, and opens it again, or runs the macro manually.
If we copy the master document using Windows Explorer, the computers have no problem running the macro when the document is openned. So Aspose.Words is doing something that is only affecting certain computers. We have been unable to identify what is different about these computers.
We are using Windows 2000 and Office 2000.
Ever seen anything like this, because we are stumped?
I have attached a document copied by Aspose.Words.
Thank you,

Please send us the original master document before it was altered by Aspose. It also will be helpful to have a code snippet illustrating how you manipulate the document using Aspose.Words.

Below is the code you requested and attached is the original file.
Thanks for your help.

Private Function WordDownload(ByVal drDocument As DataRow) As Boolean
'set license for Aspose.Words
Dim license As Aspose.Words.License = New Aspose.Words.License
Dim strDocumentName As String
Dim strDocumentFullPath As String
Dim strSaveFullPath As String
Dim strFullFileName As String
Dim drParameterList As DataRow()
'get the name and path of the master document
strDocumentName = drDocument.Item("DocumentName").ToString
strDocumentFullPath = drDocument.Item("DocumentFullPath").ToString
'get the name and path to which the document should be saved
strSaveFullPath = drDocument.Item("SaveFullPath").ToString
'get the parameter information for the document
drParameterList = pobjDocumentParameterList.GetParameterData(CInt(drDocument.Item("DocumentID")))
If Not strDocumentFullPath Is Nothing Then
Dim objWordDocument As Aspose.Words.Document = New Aspose.Words.Document(strDocumentFullPath)
'create the subdirectories needed to save the document to the specified location
CreateSubDirectories(Left(strSaveFullPath, strSaveFullPath.LastIndexOf("\")))
'save the new document
'clean up Aspose.Words
objWordDocument = Nothing
End If
'clean up
strDocumentName = Nothing
strDocumentFullPath = Nothing
strSaveFullPath = Nothing
strFullFileName = Nothing
WordDownload = True
End Function

As I see from your code you use Aspose.Words to copy your document file from one place to another. Try using simple System.IO.File.Copy for this task instead of utilizing Aspose.Words.

Thank you.
I have made the change you suggested and it is working. However, I am wondering if this is a fixable issue, because in all likelihood we will want to avail ourselves of Aspose.Words many features.
Let me know.
Thanks again.

I beleive that this issue can be fixed. The problem is logged in our defect base as Issue #829. We will deal with it in the next 2-3 weeks.

Unfortunately this issue cannot be fixed quickly. It looks like a really undocumented issue.
In fact even when a document is opened and saved using Open Office, the Document_Open macro no longer runs.
We might come back and do it in the future, but for the time being it becomes a “known issue”.

Has anything been updated on this problem? I have what seems to be the same problem. I have macros that should run Document_Open, but they do not. They work ONLY on the development machine. Anybody who accesses the file through asp.net cannot get the macros to run.

Sorry it seems like no progress yet. It’s still among known issues.

It’s been several months since the last post, is this issue still being fixed?

Just curious.

Unfortunately, this issue is still opened. We will notify you as soon as it is done.
Best regards.