Hi Brent,
First of all, I would like to confirm my understanding of your issue.
From your description, I understand that you have a C# winforms application
with a webbrowser control, you will use the webbrowser control to open a
word document.
After that you hope to Drag&Drop fields and bookmark into word. But I am
confusion where will you drag the fields and bookmark into word.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.
Based on my knowledge, the Word object modal does not allow us to handle
the drag&drop of word, it will handle the stuff itself.
Here I write some code snippet which will drag the text of a lable into the
word document host in a webbrowser.
private void Form1_Load(object sender, System.EventArgs e)
{
object o = Missing.Value;
//open a word document
this.axWebBrowser1.Navigate(@"C:\Test.doc",ref o,ref o,ref o,ref o);
//handle the mousedown event of label1 to enable drag
this.label1.MouseDown +=new MouseEventHandler(label1_MouseDown);
}
private void label1_MouseDown(object sender, MouseEventArgs e)
{
this.label1.DoDragDrop(this.label1.Text,DragDropEffects.Copy);
}
Run the windows form application and drag the text of the label and drop
into the word, the text of the label will be copied into word document.
Please apply my suggestion above and let me know if it helps resolve your
problem.
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.