Results 1 to 9 of 9

Thread: please help me!

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    10

    Angry

    hey! ,
    friends
    I am trying to link with the MSword
    I have a controll richtextbox and a command button. i want that when i click on the command button the text in the textbox are inserted in the new MSword file. however i am able to do so with following code but when i changed the text formatting in the textbox like color change, font size, font then the MSword stores the text as a normal text or stroes text without formatting.

    the code are

    dim i as word.application
    dim r as document
    dim w as range

    Private Sub Form_Load()
    Set i = CreateObject("word.application")
    Set r = i.Documents.Add
    set w =r.range()
    end sub

    command1.click()
    r.Range.InsertAfter richtextbox1.text
    end sub


    please help me /reply soon!!!!!
    thanking u
    sk

  2. #2
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    You could set the text in the clipboard(copy/paste) then send it through sendkeys. Or if there is a hotkey for changing the text the way you want it you could do that, I don't use MSWord *cough*PieceOfShit*cough*.

    Good luck,

  3. #3
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    554
    Use an OLE CONTROL and set the properties so its set up to access a WORD DOCUMENT object etc etc etc


    DocZaf
    {;->


  4. #4

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    10
    i did what u say
    i set the clipboard for this purpose
    clipboard.settext=richtextbox1.text
    but when i paste it paste normal text
    then
    i just open the clipboard then i saw that clipboard also copy normal text not the formatted text
    i use the above code to copy to clipboard

    please give me the code.........
    soon!!!!!!!!!!!!!!!!
    sk

  5. #5
    Junior Member
    Join Date
    Jul 2000
    Location
    Portland, OR
    Posts
    16

    Question

    Isn't there a copy to clipboard method for the rich text box that copies rich text formatting? Check it out. You may have to do the paste manully though.

  6. #6

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    10

    Angry

    thanks for reply

    but i tried all the method
    there is only 1 method that copies to the clipboard

    clipboard.settext richtextbox1.text

    but the settext can't copy the formatting
    if u know the coding or method then reply me soon!!!!!!
    sk

  7. #7
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ....

    Sanjay, friend,

    Did you start a new thread with this?

    I had replied to your query on VB-MS Word, but now I find that my reply is not here in this thread, so that must have been another thread. Shouldn't you be posting your new comments to the same thread? This will help you read the forum's views on your problems by visiting a single thread. Also all members who have replied to your problem need not search for their posts at different places.

    Thanks for reading.
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  8. #8

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    10

    Angry

    hi friends
    still now i am not getting the answer of my tuff problem
    please help me soon
    ur reply will solve the big problem of mine........
    sk

  9. #9
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ....

    Sanjay,

    Did you receive my mail? I had sent it to you sometime last week. If not, please let me know and I shall resend it to you. If you have received the mail, please let us know if that helped you.
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width