Hi,
I would like to populate a word document using a windows form (i.e. have a user enter text into a textbox in windows form (i.e. textbox1) and then click submit and have the application open a word document that I have created and place the users text into a form field using a bookmark (i.e. bookmark1).
got below code
-----------------------------------------
Imports Microsoft.Office.Interop
Public Class Form1
Dim wordapp As Word.ApplicationClass
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
wordapp = New Word.Application
Dim objdoc As Word.Document = wordapp.Documents.Open("c:\test")
wordapp.Selection.GoTo(What:=Word.WdGoToItem.wdGoToBookmark, Name:="Bookmark_Name")
wordapp.Selection.TypeText(TextBox1.Text)
wordapp.Visible = True
End Sub
End Class
------------------------------------------------------
I am using c#. I want to write code in c#.
Please help.