MS Word Automation
-
hey, I have devloped a program using visual c# express that performs a word mail merge using a com object. Now i am pretty new to .net and c# so this is where my problem is. I would like to know how .net works, as when I "publish" the project to a folder on my pc, and run the setup file, the program installs and it runs fine. However when I tried to run it on my laptop it would not run. It told me it didnt have the correct word PIA (interop). I also notcied that my laptop is running a different version of word. My questions are: Firstly does a pc have to have the .net framework installed to run my c# application? How can I develop my c# program so that the automation will work with a different version of word, and so that it isnt missing the required PIA? Thanks for your time. Any help or pointers is very much appreciated.
-
hey, I have devloped a program using visual c# express that performs a word mail merge using a com object. Now i am pretty new to .net and c# so this is where my problem is. I would like to know how .net works, as when I "publish" the project to a folder on my pc, and run the setup file, the program installs and it runs fine. However when I tried to run it on my laptop it would not run. It told me it didnt have the correct word PIA (interop). I also notcied that my laptop is running a different version of word. My questions are: Firstly does a pc have to have the .net framework installed to run my c# application? How can I develop my c# program so that the automation will work with a different version of word, and so that it isnt missing the required PIA? Thanks for your time. Any help or pointers is very much appreciated.
Firstly I am coming from the VB side so this may or may not be relevant. Yes, you do have to have the .net framework installed unless you disable the net framework for that project. Each version of Word (and all office applications) needs it's own PIA, however, they are usually backwards compatible. So I always develop and deploy the PIA for the latest version of word that I have. As an aside the PIA for Word 2007 is not backwards compatible at the moment.:-D Regards Graham Wade
-
Firstly I am coming from the VB side so this may or may not be relevant. Yes, you do have to have the .net framework installed unless you disable the net framework for that project. Each version of Word (and all office applications) needs it's own PIA, however, they are usually backwards compatible. So I always develop and deploy the PIA for the latest version of word that I have. As an aside the PIA for Word 2007 is not backwards compatible at the moment.:-D Regards Graham Wade
-
thanks for your help. Ok, so do you know if its possible to that the PIA installs on the machine during installation of my software? If this is possible do you know any good help / turorials? I had a search but couldnt find much. thanks again
If you are using Visual Studio, add a setup project to you solution and it shuold detect the dependancy and install it for you. Regards Graham Wade