70-543 Free Dumps Study Materials
Question 5: You are creating a document-level solution for Microsoft Office Word 2003 by using Visual
Studio Tools for the Microsoft Office System (VSTO).
You write the following lines of code in the solution.
SmartTag tag = new SmartTag(
"http://MySmartT ag/ST#MySmartTag", "My Tag"); tag.Terms.Add("Bug"); tag.Terms.Add("Error");
tag.Terms.Add("Issue"); Action action = new Action("Add Reference"); tag.Actions = new ActionBase[]
{ action }; action.Click += new ActionClickEventHandler(action_Click);
You need to add the string "Reference: " before either "Bug", "Error", or "Issue" when the smart tag
is clicked.
Which code segment should you use?
A. void action_Click (object sender, ActionEventArgs e) {
e.Range.Text = "Reference:" + e.Text ; }
B. void action_Click (object sender, ActionEventArgs e) {
e.Range.Text = "Reference:" + e.Range.get_XML (false).ToString(); }
C. void action_Click (object sender, ActionEventArgs e) {
e.Range.Text = "Reference:" + e.Properties.get_Read ("Text"); }
D. void action_Click (object sender, ActionEventArgs e) {
e.Properties.Write ( e.Range.Text , "Reference:" + e.Range.Text ); }
Correct Answer: A