
Microsoft TS: Visual Studio Tools for 2007 MS Office System (VTSO) - 70-543 Exam Questions
QUESTION NO: 1
You are creating an add-in for Microsoft Office Word by using Visual Studio Tools for the Microsoft Office System (VSTO). The add-in will display data from a Web service named Service1. Service1 runs on a server named LONDON. The Web service contains a method named GetCustomers that returns a DataSet object. You need to bind the data returned by the GetCustomers method to a DataSet object named ds. Which code segment should you use?
You are creating an add-in for Microsoft Office Word by using Visual Studio Tools for the Microsoft Office System (VSTO). The add-in will display data from a Web service named Service1. Service1 runs on a server named LONDON. The Web service contains a method named GetCustomers that returns a DataSet object. You need to bind the data returned by the GetCustomers method to a DataSet object named ds. Which code segment should you use?
Correct Answer: B
QUESTION NO: 2
You create an add-in for Microsoft Office Word 2007 by using Visual Studio Tools for the Microsoft Office System (VSTO). The add-in contains code that customizes the Ribbon user interface (UI).
You run the add-in. The add-in does not customize the Ribbon UI and does not display an exception.
You need to display the exceptions in the user interface of the add-in when the add-in starts.
What should you do?
You create an add-in for Microsoft Office Word 2007 by using Visual Studio Tools for the Microsoft Office System (VSTO). The add-in contains code that customizes the Ribbon user interface (UI).
You run the add-in. The add-in does not customize the Ribbon UI and does not display an exception.
You need to display the exceptions in the user interface of the add-in when the add-in starts.
What should you do?
Correct Answer: D
QUESTION NO: 3
You create a document-level solution for a Microsoft Office Word document by using a Visual Studio Tools for the Microsoft Office System (VSTO) project. The solution project is named HRSolution. The solution document is named HRSolution.doc. You deploy a copy of the solution document to the C:\OfficeSolutions folder on client computers. You deploy the assembly to a shared folder named OfficeSolutions. The shared folder is located on a server named LONDON. You need to ensure that the solution document loads the assembly from the correct location. Which code segment should you use?
You create a document-level solution for a Microsoft Office Word document by using a Visual Studio Tools for the Microsoft Office System (VSTO) project. The solution project is named HRSolution. The solution document is named HRSolution.doc. You deploy a copy of the solution document to the C:\OfficeSolutions folder on client computers. You deploy the assembly to a shared folder named OfficeSolutions. The shared folder is located on a server named LONDON. You need to ensure that the solution document loads the assembly from the correct location. Which code segment should you use?
Correct Answer: D
QUESTION NO: 4
You are creating an add-in by using Visual Studio Tools for the Microsoft Office System (VSTO).
You write the following method. (Line numbers are included for reference only.)
01 Private Sub ExportDocumentCache ( ByVal path As String)
02 ...
03 End Sub
You need to ensure that the add-in saves each item in the document cache of a document to an independent XML file that is named for the item.
Which code segment should you insert at line 02?
You are creating an add-in by using Visual Studio Tools for the Microsoft Office System (VSTO).
You write the following method. (Line numbers are included for reference only.)
01 Private Sub ExportDocumentCache ( ByVal path As String)
02 ...
03 End Sub
You need to ensure that the add-in saves each item in the document cache of a document to an independent XML file that is named for the item.
Which code segment should you insert at line 02?
Correct Answer: B
QUESTION NO: 5
You create a custom template for Microsoft Office Word 2007 by using Visual Studio Tools for the Microsoft Office System (VSTO). You add a content control to the custom template. The content control is a placeholder for the first paragraph in the documents that use the custom template. You need to ensure that the users can edit the first paragraph but cannot delete it. Which code segment should you use?
You create a custom template for Microsoft Office Word 2007 by using Visual Studio Tools for the Microsoft Office System (VSTO). You add a content control to the custom template. The content control is a placeholder for the first paragraph in the documents that use the custom template. You need to ensure that the users can edit the first paragraph but cannot delete it. Which code segment should you use?
Correct Answer: A
QUESTION NO: 6
You develop a document-level solution for Microsoft Office Excel 2003 by using Visual
Studio Tools for the Microsoft Office System (VSTO).
You write the following lines of code in the worksheet class.
void Handle_Change ( Excel.Range Target) {
//.. .
}
You need to ensure that the Handle_Change method runs only when the data in the range A1 through E5 changes.
Which code segment should you add to the Startup event of the worksheet class?
You develop a document-level solution for Microsoft Office Excel 2003 by using Visual
Studio Tools for the Microsoft Office System (VSTO).
You write the following lines of code in the worksheet class.
void Handle_Change ( Excel.Range Target) {
//.. .
}
You need to ensure that the Handle_Change method runs only when the data in the range A1 through E5 changes.
Which code segment should you add to the Startup event of the worksheet class?
Correct Answer: D
QUESTION NO: 7
You create an add-in for Microsoft Office Outlook by using Visual Studio Tools for the Microsoft Office System (VSTO). The add-in must set up a WindowSelectionChange event for the Outlook e-mail messages by using Microsoft Office Word as the editor.
You write the following lines of code. (Line numbers are included for reference only.)
01 void WindowSelectionChange ( Word.Selection Sel ) {
02 Outlook.Inspector ins = Application.ActiveInspector ();
03 if ( ins.EditorType == Outlook.OlEditorType.olEditorWord ) {
04 ...
05 app.WindowSelectionChange += new
06 Word.ApplicationEvents4_WindowSelectionChangeEventHandler
07 ( WindowSelectionChange );
08 }
09 }
You need to bind the event to the Word application object.
Which code segment should you insert at line 04?
You create an add-in for Microsoft Office Outlook by using Visual Studio Tools for the Microsoft Office System (VSTO). The add-in must set up a WindowSelectionChange event for the Outlook e-mail messages by using Microsoft Office Word as the editor.
You write the following lines of code. (Line numbers are included for reference only.)
01 void WindowSelectionChange ( Word.Selection Sel ) {
02 Outlook.Inspector ins = Application.ActiveInspector ();
03 if ( ins.EditorType == Outlook.OlEditorType.olEditorWord ) {
04 ...
05 app.WindowSelectionChange += new
06 Word.ApplicationEvents4_WindowSelectionChangeEventHandler
07 ( WindowSelectionChange );
08 }
09 }
You need to bind the event to the Word application object.
Which code segment should you insert at line 04?
Correct Answer: D
QUESTION NO: 8
You are creating an add-in for Microsoft Office Excel by using Visual Studio Tools for the Microsoft Office System (VSTO). The add-in will create a local database during the installation process. The add-in will extract data from the database. The add-in must be installed only on computers that have Microsoft SQL Server 2005 Express Edition. You need to configure the default setup project for the add-in. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
You are creating an add-in for Microsoft Office Excel by using Visual Studio Tools for the Microsoft Office System (VSTO). The add-in will create a local database during the installation process. The add-in will extract data from the database. The add-in must be installed only on computers that have Microsoft SQL Server 2005 Express Edition. You need to configure the default setup project for the add-in. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Correct Answer: C,E
QUESTION NO: 9
You create a document-level solution for Microsoft Office Excel 2003 by using Visual Studio Tools for the Microsoft Office System (VSTO).
You add the following method to the workbook class.
void NotifyChanges (object Sh , Excel.Range Target) {
//No tify changes
}
You need to set up an event handler that fires NotifyChanges only when the data in the current workbook changes.
Which code segment should you use?
You create a document-level solution for Microsoft Office Excel 2003 by using Visual Studio Tools for the Microsoft Office System (VSTO).
You add the following method to the workbook class.
void NotifyChanges (object Sh , Excel.Range Target) {
//No tify changes
}
You need to set up an event handler that fires NotifyChanges only when the data in the current workbook changes.
Which code segment should you use?
Correct Answer: C
QUESTION NO: 10
You create a document-level solution for Microsoft Office Excel 2003 by using Visual Studio Tools for the Microsoft Office System (VSTO). The customized worksheet must have a button in a cell of the first row and the first column. The button must be automatically resized when the cell is resized. You need to create a button that meets the requirements. Which code segment should you use?
You create a document-level solution for Microsoft Office Excel 2003 by using Visual Studio Tools for the Microsoft Office System (VSTO). The customized worksheet must have a button in a cell of the first row and the first column. The button must be automatically resized when the cell is resized. You need to create a button that meets the requirements. Which code segment should you use?
Correct Answer: A




