edgarattec
Technical User
Hi,
Currently i am porting a large access application from access2.0 to access2000.
The application is used to keep track of customers, logistics and users are able to create several types of documents (faxes, memo's, letters etc etc). It is also possible to read existing documents. The documents are opened with MS word. One problem with the old system is that once a user opend an existing document or created a new one and later on accidentally or on purpose closed word, the application lost its connection with word and the user had to restart the access application.
In the application word was started with the command:
The object wordobj is a global variable for the whole application.
First i ported the application to access97 and word97. I "solved" (actually is was more like a workaround than a solution) this by issuing the command wordobj,apphide. If this comnmand failed, i knew word was killed by the user, so i could restart it before opening or creating a document. This worked fine.
Now i have to move the application to office2000 and the problem is back again.
Due to the changed document interface of word2000 (changed from multiple doc interface to single doc interface) users get lots of items in the taskbar if they have many documents open. The users policy is to save all document and close word.
Now i have the following problem: the code wordobj.apphide succeeds (although word was closed there is still a winword process), the application "thinks" it has access to word, but if i use the property documents.count i get an error like "the server machine cannot be found or is unavailable". I have to manually remove the winword process and the access application, and most of the time even the PC must be restarted to get things working again.
What must i do?
1. remove the old declaration
and use
instead? if so, where can i find the equivalents of the methods/properties of word.basic and word.application
2. (preferred) can i start word but make it impossible for the users to kill it?
3. Any other ideas?
Any help would be greatly appreciated, I am struggling with this for some time and can't decide what to do.
Edgar.
Currently i am porting a large access application from access2.0 to access2000.
The application is used to keep track of customers, logistics and users are able to create several types of documents (faxes, memo's, letters etc etc). It is also possible to read existing documents. The documents are opened with MS word. One problem with the old system is that once a user opend an existing document or created a new one and later on accidentally or on purpose closed word, the application lost its connection with word and the user had to restart the access application.
In the application word was started with the command:
Code:
wordobj = createobject("word.basic").
The object wordobj is a global variable for the whole application.
First i ported the application to access97 and word97. I "solved" (actually is was more like a workaround than a solution) this by issuing the command wordobj,apphide. If this comnmand failed, i knew word was killed by the user, so i could restart it before opening or creating a document. This worked fine.
Now i have to move the application to office2000 and the problem is back again.
Due to the changed document interface of word2000 (changed from multiple doc interface to single doc interface) users get lots of items in the taskbar if they have many documents open. The users policy is to save all document and close word.
Now i have the following problem: the code wordobj.apphide succeeds (although word was closed there is still a winword process), the application "thinks" it has access to word, but if i use the property documents.count i get an error like "the server machine cannot be found or is unavailable". I have to manually remove the winword process and the access application, and most of the time even the PC must be restarted to get things working again.
What must i do?
1. remove the old declaration
Code:
Createobject("word.basic")
Code:
CreateObject("word.application")
2. (preferred) can i start word but make it impossible for the users to kill it?
3. Any other ideas?
Any help would be greatly appreciated, I am struggling with this for some time and can't decide what to do.
Edgar.