Last post Oct 23, 2015 09:57 AM by Boris Pavlovic
May 30, 2011 05:33 PM|tr-en-jp|LINK
This is the urgent issue. I hope somebody can help me to solve my problem.
I have a requirement to write a business letter from ASP.NET c# application.
The business letter should be in one TEXTBOX and with all functionality of MS WORD (tab, bold, JUSTIFY, etc)
I would like to save that letter into table with other fields. Finally i want to print that record with other fileds as a busines letter .
of course user need to edit it as well.
I tried to use telerik rad editor but i could not "justify" my textbox while I print my letter. I am looking for something like this Message box where i am writing my message. but I could be able to print it with "tab", "justify" and other functionality.
my users must not use MS WORD to write letter for my web application.
I read some articles about FREETEXTBOX, CUTEEDITOR, RICHTEXTBOX etc. I am not sure which one is the certain solution
I need your idea to find certain solution as soon as possible.
Thank you for your cooperation
there are a lot of departments in the company sending letter to each other with attachment , one of the section is part of the government. sometimes an application process takes 1 month to complete and there are a lot of applications at the same time. I
already wrote the web project to manage the whole situation. but user typing the data to web application WITHOUT business letter!!!!!!
May 31, 2011 04:48 AM|breath2k|LINK
What's the reason they can't use MS Word or other office programs?
May 31, 2011 03:12 PM|tr-en-jp|LINK
Because some of the dynamic fields include the letter. for example: Letter number, date, subject, person identity number, approvers etc.
If users write the letter with MS-word, they should input some of the text into web application too. like they are doing their work twice. i can upload the word doc into web application but how can i print it with other fields . Users have to input letter
number, subject, date, licence number etc for web application then print it with text/business letter which must be designed perfectly( paragraph, bold, justifiy,etc)
This project is , to apply for some kind of licences. Each department applying for their stuff. Process is long and must move between 4 departments. any time, licence owner wants to learn where is his application. what kind of situation has been done, when
is he going to get it etc. like delivery system. program has been written and is being tested by users who dont want to write the business letter seperately. I agree with them.
Maybe there are some different solutions about this issue but i could not see certain solution. so i need help and ideas.
Thanks for your reply
I hope somebody will help me
May 31, 2011 03:23 PM|smirnov|LINK
There are really a lot of controls that do this stuff: http://www.google.com/search?q=asp.net+rich+text+editor
For instance, this forum used TinyMCE: http://tinymce.moxiecode.com/tryit/jquery_plugin.php
See example on how it can be integrated in ASP.NET: http://www.codeproject.com/KB/aspnet/IntegratingTinyMCE.aspx
May 31, 2011 05:15 PM|tr-en-jp|LINK
Thanks for your reply and links.
I am going to check all of them but I found the following document and some others.
they are using word template . I feel that this type of solution is may be correct for my application.
I have almost 10 different type of letter and user slightly changing them and writing dynamic fields values(letter number,date etc which come from my database) and printing.
do you think word template is some kind of solution or any type of rich text editor is the best.?
I am worry about rich text editor if there is some kind of character problem such as <p></p> , justify ,bold etc. because business letter must be design perfectly. there is no excuse for any kind of character problem.
I really appreciate for your idea. Please direct me to the right way . time is running out!!!!
Jul 10, 2011 06:05 PM|breath2k|LINK
If you create normal word documents and then create bookmarks you should be able to use the Microsoft Word Object to open a document and change the bookmarks accordingly and re-save it as a new filename.
I'll run through what I mean, on that link if you look at the image marked 'Figure 7' this gives an idea of how to create a word document using bookmarks, as you can see relevant fields are typed like so: [FirstName] [LastName] etc. If you then highlight
each individual one (including the brackets) you can then add it as a bookmark on the document within the top menu of Word.
When you are finished save the document as a normal .doc and then save it to a relevant location your application can get to and reference this new document/template in your database.
Next you will need to add a new reference in your project to the Microsoft Word x.x Object Library.
If you then look at this other post here: http://forums.asp.net/t/1048877.aspx you will see how to open a word document and change it's bookmarks. You can then save it with whatever filename you want (so you don't
overwrite the original template THIS IS IMPORTANT OR IT WON'T WORK THE NEXT TIME).
Jul 10, 2011 06:08 PM|breath2k|LINK
You could even go further by allowing users to create the documents and bookmarks themselves and be able to upload them.
Oct 23, 2015 09:57 AM|Boris Pavlovic|LINK
I know this post is very old but the topic is still very actual. I would like to point to a
3rd party .NET library that solves exactly this kind of problem. All those looking for a template based mail merge/document generation solution should look into this option as well. This toolkit allows you to use ordinary
Word documents as templates which can be populated with your application data. The toolkit also has a special Add-In for MS Word that allows even end users to edit template documents and even change or add new placeholders from the visually listed available