PDA

Click to See Complete Forum and Search --> : INDIA URGENTLY WANTED


sanjay
Jul 15th, 2000, 03:32 AM
hey
i am doing the vb project& try to link with the MS-word. i have a richtextbox in the form & i want that my richtextbox's text is to be placed in the ms word by clicking the command button. so i am able to do so through the following coding but when i click on the button then MSword take the text as a normal text( it removes the formatting )
for ex- if i change the font , color in the text box then it doesn't appear in the ms-word. msword take a text as a normal text or without formatting

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