Hi, i am having problem with word automation. my code is working fine in my local system.but when i deployed the code and resigerted the dll also into the terminal server it is not working. i am using word2003 professional but terminal server contains word2003 standard. please anyone help me. This is my dll coding, Code: Option Explicit Private mwrdApp As Word.Application 'Holds Word instance Private Sub Class_Initialize () Set mwrdApp = New Word.Application 'Create Word instance End Sub Private Sub Class_Terminate () mwrdApp.Quit 'Kill Word instance Set mwrdApp = Nothing 'Kill reference End Sub Public Function GetWord () As Word.Application Set GetWord = mwrdApp 'Return Word instance End Function This is my asp coding, Code: <% Set WordServer = Server.CreateObject("Test.Wordserver") Set objWordobject = WordServer.GetWord 'Get Word instance objWordobject.Visible = True strTemplate="c:\template.dot" 'Open doc Set objDocobject=objWordobject.Documents.add(strTemplate) %>
When you use Word.Application by adding a reference to word application the compiled code becomes tightly coupled with the version of the word used and the client also should have the same version. Either you need to compile the code on the client machine or use the same version when writing the code. I had the same problem with MS Outlook with version 9 and 10 conflict and the last thing I wanted to do is downgrade my office from XP to 2000 and I had to do that for the successful running of my application.
hi shabbir, Thanks for your wonderful reply. If so then how can i create a generalized dll for my application? according to you, all my clients who are running my application should have same version in their system that my server has right? please advice me. Thanks, Kalees
Yes thats true. Or if you are unsure of the client version as to what he might be running use the different dlls and have an installer to detect the office version and copy the correct dll. You may even need to use InstallShield instead of the default dll setup utility.
Hi Shabbir, Thanks once again. Can you briefly explain about the installer or InstallShield? how to create it and use it? I have a doubt on word automation, suppose one client might use my application that time whether the dll open the server word document or client's pc word document? Please guide me.because i have to deliver this very soon. Thanks, Kalees
http://www.macrovision.com/products/flexnet_installshield/installshield/index.shtml The best option for fast delivery would be to have multiple dll's for each version of word and load the particular dll for the specific version found on the system
Hi shabbir, Thanks for the reply. But i tested word automation like this, i installed the dll and asp page into the another system and open the page from my system like this http://192...(ip address of the another system)/virtualdirectory of the another system/asppage.asp but the word document is opening in the another system not in my system. My requirement is opening a word document from a server and user can save it in to their pc. please kindly advise. Thanks, Kalees
Hi Shabbir, How to download a word document from a server automatically and save it to the client system? Before the download, i have to open the file and change some content in the server. Thanks, Kalees
Are you asking how to allow download of a word document. Just place a link to the word doc and clicking will download on the client machine.
Hi Shabbir, Thanks for the reply. how to allow download of a word document from server automatically? consider this situation, one user use my application and fill up some information over the form and he want to take copy of it. here we reteirve all the values from the form and replaces with these values over the word template already we have on the server. Finally we allow to download as word document. do you understand the requirement? Thanks, Kalees
To allow any file to be downloaded you need to send the file into the header. Refer to http://www.go4expert.com/showthread.php?p=4352#post4352 for allowing the download for a file.
hi Shabbir, Thanks for the reply. Can we allow download a word doc from server to client system using the VBA? Thanks, Kalees
Hi Shabbir, Thanks for the reply. can we open a word document in the browser using vba? like this, Set Docobject=wordobject.documents.add(strTemplate) Docobject.Activewindow............... please advice me. Thanks, Kalees
hi shabbir I need one help in asp and pkease help me out here. I want to find the word as a password protected file or not using asp. this function i need to uploading a file to the server if it is going to be an password protected file means it shouldn't get upload to the server . Thanks Muthu Saravananmail@gmail.com
splendorsaran, instead of jumping into an old thread with your query try putting it as a fresh thread for us to see. Also try reading [thread=168]Before you make a query[/thread] thread.
I am trying to use word automation to generate word document with the results from the client side javascript. So is there any work around to disable the Active X warnign I get on the page? My requirement is say , I have my page of search results at Appartment for Rent in Hyderabad. I would like to have the option of user saving those results in the word document by clicking on the button. I know that this can be done from the server side and sending back the doc, but wondering to see if I can do it frmo the client side as all the data is already available on the client side