Changing Word references in VB.net project

Hello,

I have created an application which generates a word document.

In my project references I have Microsoft Word 14.0 Object Library.

The app works fine on my development machine, which has Office 2013 installed.  If I transfer the app to system with Office 2010 on I get the error "Could not load file or assembly Microsoft.Office.Interop.Word, Version=15.0.0.0.

Please could you tell me the adjustments I need to make the app 2010 compatible.  

Thanks.
LVL 1
Petermcg001Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
Sorry, in my second comment, I meant to use Late Binding. This way, you remove every reference to Office.

Check "Create an Automation Client That Uses Late Binding" from http://support.microsoft.com/kb/304661
0
 
Éric MoreauSenior .Net ConsultantCommented:
the best thing you can do is not reference Office but an external third party like http://www.aspose.com/.net/word-component.aspx to create documents
0
 
Éric MoreauSenior .Net ConsultantCommented:
0
 
Petermcg001Author Commented:
Hello,

Thanks for looking at this.

I actually used the MS example as the basis of my code so I'm not sure what to change in the references.
0
 
Petermcg001Author Commented:
Hi,

That works fine

Thank you so much!

Peter
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.