Click here to Skip to main content
15,899,026 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I like to bind a text field with pictures and complete layout (word document) to a outcome in a text box.

So if in the text box is the number 7, it calls the corresponding textfile with text for number 7.

The same for example if the outcome in the textbox is 5, the file that correspondent with 5 had to be call.

In seccond place, the different outcomes/files, need combined to a report.

I need to program this in Visual Studio 2013 C#.

Inspired greetins,

Wilco

What I have tried:

I have tried this to work out with bookmarks in word and the use of C#.
I have posted this on the form, but no reaction at all when I asked for a working solution.
Posted
Updated 2-Aug-16 20:10pm
Comments
BillWoodruff 2-Aug-16 8:25am    
Sounds like you need to use a DropDownList to Select the ID's of the available Word documents. You could possibly use a Dictionary linking ID's with Word Doc filepaths, and then bind the DropDownList to that.

Please clarify your question: are you controlling Word from C# ? Is this a WinForm project ? or ?
wilcoten 2-Aug-16 8:43am    
Hi,

I need the sollution for a program that a student has start for me a year ago, to automate my numerology reports. The part of the calculations are ready, I have the textfiles in word, and the attachement is the way it has to be when the program works. The outcome of the calculations correspondent with a word file, for example the outcome of a Life Path caluculation with a 1 as outcome, should call the "Life Path 1 document. Save this as a result. When all calculations are done, I shoose the kind of report, with the calculations needed for that report. Then the program combine all the documents until the result is what is in the attachement.

So if I know how to do this without a database, that will be great.

I need this program work, because I start a fund raising for a girlfriend with breastcancer and mastases to the lungs, lymfe and bones.

I will do a big mailing for the numerology reports, but at the moment it takes minimal 3 hours a report to combine it, so I can't deliver, and get money for her cure now. Also for a fund raising by GoFundMe I need the program, so I can give a little report for every donation, or give people the oppurturnity to order a report to help her.

So if you know someone who can program the last part will be fine, because I that student that is working for more than a year on it, while it is not so complicated, but he needs his time to study, party, and social events, I decided to quite whit him, and finisch the program myself, with help from forums, but by knowledge is very basic because I don't have the time because of the illness of that girlfriend to dive deep in this program language.

Inspired greetings, Wilco
deepankarbhatnagar 2-Aug-16 10:47am    
Have you tried something?
wilcoten 2-Aug-16 10:51am    
As you can read in my question with word and bookmarks, that replace text, but I had only the example in Visual basic and not in C#, and don't know how to convert this into C# and let it work, and of this is the best and simple method for what I want.
RickZeeland 2-Aug-16 13:22pm    
Maybe you can find some information in this question: http://www.codeproject.com/Questions/166589/word-automation-problem-in-c

1 solution

I found some code to merge Word documents, it uses the Microsoft.Office.Core library:
Mwalimu's Corner: C# Tutorial - Combine Multiple Word Documents into One Word Document[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900