Click here to Skip to main content
13,199,318 members (64,479 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Morning guys and girls

I'm stuck between a rock and a hard place and I would appreciate any type of help.

I have created an .EXE to be emailed/written to cd and then given to a client off site.

The programme takes some values filled into textboxes by the client to perform a couple of calculations and then, in a couple of other textboxes give the client results.

I then export/generate a temporary office word document that contains all these textbox values, print the document and then deletes the word file. The reason is that we don't want digital copies of results available, since the client just might change the document.

Now this all work well on my pc as it should. I then tried it on other pcs in the office and found that some are not running the .Net 3.5 framework and has to be installed to run, this I sorted out by attaching the .Net 3.5 framework to the cd or email to the client.

Then I got another error... This makes reference to 'Microsoft.Office.Interop.Word' which I understand to be a serial number/version number problem blah blah blah. I have read that you can download the fix for this but the thing is I don't want the client to download "10" fixes before they can use the programme, it must be open, use, print, close, done.

What else can I do to export information to a document containing graphics like logos etc, print the document and then delete?
Posted 7-Feb-13 0:26am
VitorHugoGarcia 7-Feb-13 6:36am
Instead of working with MS Word, could you produce a PDF file ?
JacquesGrobler 7-Feb-13 6:40am
I can have a pdf, but if the client only has a "pdf printer", can this still be done? It doens't matter what means, as long as it works and as long as the client doesn't require any additonal software to operate the programme.

Then the next question is, can .Net alter an existing pdf?
VitorHugoGarcia 7-Feb-13 7:10am
You can create a PDF file from scratch. Take a look here
CHill60 7-Feb-13 6:41am
Could you produce an RTF file?
JacquesGrobler 7-Feb-13 6:44am
What is an RTF file? Can it incorporate company logos, other text than what is in the exe?
CHill60 7-Feb-13 6:46am
RTF = Rich Text Format. I believe it can hold logos ... check out the use of RichTextBox control
CHill60 7-Feb-13 6:50am
Just found this which might help
JacquesGrobler 7-Feb-13 6:52am
Thanks Chill

Having a look now, will let you know.
JacquesGrobler 7-Feb-13 7:06am
Do you perhaps have an example of how this works as I have never seen this before?
CHill60 7-Feb-13 8:27am
Found it! Not surprisingly somewhere in CodeProject :-) Have a look at this link -
There is also a specific question with another code snippet in the comments afterwards - a long way down though! The code is in C# but there are plenty of conversion tools around (e.g.
Mike Meinz 7-Feb-13 9:39am
This solves the version issue for the Word InterOp Assembly in Visual Studio 2012.

After you Add the Reference to Microsoft.Office.InterOp.Word in your project, select Microsoft.Office.InterOp.Word in the list of added references and then click Properties. In the Properties dialog, change Specific Version to False.
JacquesGrobler 8-Feb-13 2:04am
Hi Mike

I can't see the option to change the version under the properties dialog
JacquesGrobler 8-Feb-13 2:44am
Sorry, I see that I can do this in VS 2012, I unfortunately run 2008
CHill60 7-Feb-13 11:12am
Also found this - where the chap has tried to make it non-version specific by using .PrintOutOld

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171020.1 | Last Updated 3 Aug 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100