how to write into the word document from the task pane's combobox I fill the combobox from database but i can sent the combobox.SelectedItem to cursors positioned point.
Globals
.ThisDocument.Paragraphs[1].Range.Text = cmb.SelectedItem.ToString();this code every time writes top of the document and if there are any word replace over.
please help..
thanks..

writing into the document (VSTO - C#)
mvpfp
Globals.ThisDocument.myBookmark.Text = cmb.SelectedItem.ToString();
HTH.
Bye
Aludaan
I would suggest using a Bookmark control to capture the item selected from the combo box.
I just tried this using a bookmark on the document and a combobox in the actions pane. In this example, the bookmark is called "bookmark1" and the combobox is called "comboBox1". Here is the code:
Globals.ThisDocument.bookmark1.Text=this.comboBox1.Text.ToString();
It works very well. :>) Now, it's important to note that the value of the bookmark will change everytime you select something in the combobox.
I hope this helps.
Thanks!
Mike Hernandez
Community Program Manager
VSTO Team