-
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
-
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,
-
Use an OLE CONTROL and set the properties so its set up to access a WORD DOCUMENT object etc etc etc
DocZaf
{;->
-
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!!!!!!!!!!!!!!!!
-
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.
-
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!!!!!!
-
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.
-
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........
-
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.