Hi All i have been building a small system to dyanmically create letters from windows forms i have built a letter designer as such which is purely a rich text box and a load of combo's contained in each combo are field items which can be inserted in the letter these field items are stored in a table and are formatted as such
[{NAME}]
[{ADDRESS}]
Etc.
So when your using the letter designer you simply select a field from a combo and that then sticks it in the rich text box so example
Dear [{NAME}]
blah blah blah....
So this is the bit im having trouble with
I have a win form that contains all the elements required to fill a letter, but how to link them ?
Because the field items are contained in a database they are up to the user to define, this now gives me a massive headache
i was thinking about having a COM called letterGenerator to which i pass in certain properties depending on the form i will have to pass a property to show which letter to generate (oh yeah letter templates are also saved in the db)
i was wondering if theres any way to automaticaly generate properties depending on what field items are stored for example doing some kind of loop of my LetterFieldItems table and then setting the properties for each item in the table......
This way when i call the COM i would see what properties i can assign depending what the user has defined
Any comments on this method or any other methods you have in mind are welcome




Reply With Quote