i want my textbox to show bold font in word file

Last post 07-11-2008 6:44 AM by H_R. 5 replies.

Sort Posts:

  • Big Smile [:D] i want my textbox to show bold font in word file

    06-28-2008, 3:45 AM

    Hi all,

    I am using following code to display word file in text box

     

    Dim wordApp As New Word.ApplicationClass()

          
            Dim nullobj As Object = System.Reflection.Missing.Value

            Dim doc As Word.Document = wordApp.Documents.Open(Session("resumepath"))

            Dim doc1 As Word.Document = wordApp.ActiveDocument

            Dim m_Content As String = doc1.Content.Text

            txtresume.Text = m_Content

            txtresume.Text = doc1.Content.Text

            doc.Close()

            wordApp.Quit()
     

     

    But , the problem is ,even the bold contents in the word file appear as normal text in text box . I want the content in the word file to appear as it is in text box . how can i do this ???...

    ( I have set the READONLY property of textbox as true so the textbox doesn't appear purely white ...how to avoid this also ?) 

     

    Thanks...

    Please Mark the post as "ANSWER" if it helps you
  • Re: i want my textbox to show bold font in word file

    06-28-2008, 6:30 AM
    Answer
    • Loading...
    • H_R
    • Joined on 02-04-2004, 11:09 PM
    • SomeWhereNear
    • Posts 300

    It's not possible to apply style to text in a normal textbox , -Of course it is possuble to apply style to your textbox for example make all text blod -  but if you need a more flexible Text editor you can try so called "WYSIWYG" editors. some of them are available on the net for free : for example take a look at this one : http://freetextbox.com/

    Don't forget to click "Mark as Answer" on the post(s) that helped you.
  • Re: i want my textbox to show bold font in word file

    06-28-2008, 2:05 PM

    Hi..

    Thanks for info..

    I have downloaded one such text box TX Text Control.NET 14.0 

    But how can i use in forms?....what will be code like ?

     How can i bring it in toolbox ?..how can i drag and drop it ?..

     

    Please Mark the post as "ANSWER" if it helps you
  • Re: i want my textbox to show bold font in word file

    07-10-2008, 10:16 AM
    Answer
    • Loading...
    • H_R
    • Joined on 02-04-2004, 11:09 PM
    • SomeWhereNear
    • Posts 300
    Don't forget to click "Mark as Answer" on the post(s) that helped you.
  • Re: i want my textbox to show bold font in word file

    07-11-2008, 12:46 AM

    thanks HR

    It works now..i added .dll

    it can show linebreak in word file but not bold text ( maybe i have to pay for it)

    i have marked ur answer as "ANSWER" but its not showing "MARKED AS NOT ANSWER"...its happening with every post i

    marked as answer..i dont knw whats the problemm

    but Thanksss a lot 

    Please Mark the post as "ANSWER" if it helps you
  • Re: i want my textbox to show bold font in word file

    07-11-2008, 6:44 AM
    • Loading...
    • H_R
    • Joined on 02-04-2004, 11:09 PM
    • SomeWhereNear
    • Posts 300

    as far as I remember it accept most formats of word file !

    thank you my posts marked as anwer now ;)

    Don't forget to click "Mark as Answer" on the post(s) that helped you.
Page 1 of 1 (6 items)
Microsoft Communities
Page view counter