Is NetOffice my best option?

Oct 25, 2012 at 2:08 PM

Hello.

I'm developing an C# application and I'd like to have some integration with the Office suite. 

But I don't know if NetOffice is my best option. Can you help me regarding that?

The solution is going to be used for students / teachers in the final semesters of Law School, that serve low income families - our customers. 

Almost all the interaction between our department and our customers are done by our interns - the Law School students. 

How it currently works:

1. The students talk to our customers (low income families). 

2. If it isn’t the customer’s first visit, the intern queries our Access system to see the records form previous visits.

3. In these talks, the students try to gather all the information and actions needed to solve our customers’ needs.

4. Based on what the intern gathered so far, it has to report it. The intern opens up Word and types some basic info (like its name and its teacher) along with info about what the customer needs / what happened in the meeting. 

5. The intern prints the report and takes it to be approved by his teacher. 

6. Here, there are three options: 
6.1 - the report is correct and has all the info:  the teacher approves it as it is;
6.2 - the report is somewhat incorrect: the teacher tells the student what to change and the next version is implicitly approved;
6.3 - the report is incorrect: the teacher tells  the students what needs to be changed, and the next version needs to be explicitly approved.  He goes back to step 3. 

7. When the report is approved, the intern copies the text from the Office document and pastes/add it to our internal Access system.

8. The teacher saves all the reports' versions. These reports are used to evaluate the students.  

Problems:

1. The approved report is not added to our internal system.

2. Extreme use of paper.

Solution: Word integration.

From our internal system, when seeing the customer’s history, place a button that would launch Word side by side with the internal application.

Remove the “Save / Save As” command. Replace with a custom Save button. That button would send the report to the internal system.

When evaluating the report, the teacher can then use Word’s revision control to correct things and make notes.

When working on the next version the student can then approve the changes.

Or maybe have just a panel with Word editing features in the internal system that would allow me to enter text.

Can this be accomplished with NetOffice? Or am I going to be better served using VBA? Do you have better ideas on how to proceed?

Thanks in advance, for your time and support,

Luiz Angelo. 

Coordinator
Oct 25, 2012 at 2:21 PM

you didnt read my mail answer? (send to your @live.com address)

Sebastian

Oct 25, 2012 at 5:19 PM
SebastianDotNet wrote:

you didnt read my mail answer? (send to your @live.com address)

Sebastian

Sorry, Sebastian.

I read just now. I wasn't aware you had replied me. Somehow it went unnoticed.

I'll post your answer here just for reference:

hello luiz,

as first: embbed an office application into a windows forms application is a bad idea. i know, its nice but this way cause problems, moreover different problems on different systems. the applications doesnt works well with modal dialogs, repaint client areas and so. (typical is the office application crash if you  forget to free the application window on the desktop while shutdown)

i cant decide this for you but make the situation more clearly.
you can do all what you say with NetOffice but you can do this also with VBA, VB6, with the interop assemblies or VSTO. the code is basicly is same because all these apis offers you the COM Automation Object Model from Office/Word. VBA/VB6 is easy to use and to deploy but limited possibilities of course. if you want to use the .NET technology you have to decide you want support one or more word versions.
the interop assemblies works only with one specific version, since .net 4.0 you can use a feature called embed interop types in your c#/vb.net project. you need no xtra dll's and you are versionindependent in this way but you cant use events now in other words no chance to catch a click from a button or something like that. vsto exists in various version and supports office 2007 and 2010 in the last version(only with .net 4 usable as far i known but you find a helpful table on wikipedia) vsto offers some nice xtra tools/visual designers but its very hard to register/deploy and you need visual studio professional btw. NetOffice is similiar to the interop assemblies but true versionindependent and event support of course. another killer feature(i find) is the com proxy lifecyle management. if you know COM programming in .NET then you know you have to free any object with a special method. if you dont do that then the office app dont die after quit. this is much easier in NetOffice because you dont need to be free any object here. you also need not xtra registration or something like that, copy the assemblies and thats it. NetOffice has also some nice xtra tools but VSTO is better opponent here(of course, the MS VSTO team has more ressources than me) finaly, if you need to support a wide range of office versions/plattforms and you need events then NetOffice is a good way. all the other stuff in NetOffice was benefits for developers to reduce code/development time and typical problems but not true necessary. have a look on the NetOffice examples, you see the code is same as interop or vsto.

Sebastian

Anyway... VSTO is not an option. No Professional VS for me.

I wouldn't have to support multiple versions of Office, just Office 2010. 

I don't have experience in COM. I'll take a look at the examples. I just wanted to be sure that NetOffice could solve my problems and that it was the easiest solution.

Thank you and you'll probably hear more from me down the road.

Regards from Brazil, 

Luiz Angelo.