Requirement:-
Vs(2008)
Vsto Tool
Sqlserever
and Interest
Create Database Myprofiletest having Follwing Fileds..
Srno
Name
Sex
Address
Profession
Know Let Start With Visual Studio
1}

Create Simple Table in word which have Name,Address,Sex,Profession and put as header in Table TD.
2}

Know select Datasource from Data menu from Top.
3}
 When u Click datasource u will see 3 option
When u Click datasource u will see 3 option4}
 Know select Database and complete Procedure to Connecting and Creating Connection String
Know select Database and complete Procedure to Connecting and Creating Connection String5}
 Once u connected properly u Given Oprtion Select select Table u have Created
Once u connected properly u Given Oprtion Select select Table u have Created6}
 U will Filed in Datasoursce Tab it will map it self with control example if text it will Give Text and datTime then Picker Control.. Etc
U will Filed in Datasoursce Tab it will map it self with control example if text it will Give Text and datTime then Picker Control.. Etc7}

Drag and Drop The filed where u want
8}

When u Run Output u will See..
9}
 if want Chk Some and put message and on Event of That
if want Chk Some and put message and on Event of Thatprivate void plainTextContentControl2_Entering(object sender, Microsoft.Office.Tools.Word.ContentControlEnteringEventArgs e)
{
// Display the dialog window for the edit operation
System.Windows.Forms.DialogResult myResult = new DialogResult();
// Message with Yes/No option to proceed
myResult = MessageBox.Show("Do you want to UnLock?", " Address?", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2, MessageBoxOptions.DefaultDesktopOnly, false);
// If you select the no it will remain in lock mode and display the content
if (myResult == DialogResult.Yes)
plainTextContentControl2.LockContentControl = false;
}
chk the above code
 

VSTO: adding data to table using office word
ReplyDeletei connected to database using datasource object. added object to the table, but i am able to see one record. even in that table it have more than one record. what is the problem.