Microsoft TS: Visual Studio Tools for 2007 MS Office System (VTSO) - 70-543 Exam Practice Test
You are creating an application for Microsoft Office Word by using Visual Studio Tools for the Microsoft Office System (VSTO). The application will contain a namespace named WordAddInNS.
WordAddInNS will contain the following items:
a class named WordExcelIsland
a method named GetDataIsland
a typed dataset class named WSS_DataSet
You write the following lines of code. (Line numbers are included for reference only.)
01 private void GetDataIsland (string DocPath) {
02 using (ServerDocument sd = new ServerDocument(DocPath)) {
03 CachedDataHostItemCollection HC = sd.CachedData.HostItems;
04 if (HC.Count > 0 &&
05 ...
10 ) {
12 ...
13 }
14 }
15 }
You need to load all the data islands of the type WSS_DataSet from the local document cache.
Which code segment should you insert at line 05?
WordAddInNS will contain the following items:
a class named WordExcelIsland
a method named GetDataIsland
a typed dataset class named WSS_DataSet
You write the following lines of code. (Line numbers are included for reference only.)
01 private void GetDataIsland (string DocPath) {
02 using (ServerDocument sd = new ServerDocument(DocPath)) {
03 CachedDataHostItemCollection HC = sd.CachedData.HostItems;
04 if (HC.Count > 0 &&
05 ...
10 ) {
12 ...
13 }
14 }
15 }
You need to load all the data islands of the type WSS_DataSet from the local document cache.
Which code segment should you insert at line 05?
Correct Answer: B
Vote an answer
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 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
Vote an answer
You create an add-in for Microsoft Office Word by using Visual Studio Tools for the Microsoft Office System (VSTO). You will use Microsoft Visual Studio 2005 Bootstrapper to install the add-in.
The Product.xml file for the Bootstrapper contains the following XML fragment. (Line numbers are included for reference only.)
01 < InstallChecks >
02 < AssemblyCheck Property="VSTORInstalled"
03 Name="Microsoft.Office.Tools.Common"
04 PublicKeyToken="b03f5f7f11d50a3a" Version="8.0.0.0"/ >
05 < /InstallChecks >
0 6 < Commands Reboot="Defer" >
07 < Command PackageFile="vstor.exe" >
08 < InstallConditions >
09 ...
10 < /InstallConditions >
11 < /Command >
12 < /Commands >
You need to ensure that Microsoft VSTO Runtime is installed on the target computers.
Which XML fragment should you insert at line 09?
The Product.xml file for the Bootstrapper contains the following XML fragment. (Line numbers are included for reference only.)
01 < InstallChecks >
02 < AssemblyCheck Property="VSTORInstalled"
03 Name="Microsoft.Office.Tools.Common"
04 PublicKeyToken="b03f5f7f11d50a3a" Version="8.0.0.0"/ >
05 < /InstallChecks >
0 6 < Commands Reboot="Defer" >
07 < Command PackageFile="vstor.exe" >
08 < InstallConditions >
09 ...
10 < /InstallConditions >
11 < /Command >
12 < /Commands >
You need to ensure that Microsoft VSTO Runtime is installed on the target computers.
Which XML fragment should you insert at line 09?
Correct Answer: D
Vote an answer
You are creating an add-in for Microsoft Office Outlook by using Visual Studio Tools for the Microsoft Office System (VSTO). You write the following lines of code. (Line numbers are included for reference only.)
01 Private folders As List(Of Outlook.MAPIFolder)
02 Private explorer As Outlook.Explorer
03
04 Public Sub CreateCollection()
05 explorer = Application.ActiveExplorer()
06 folders = New List(Of Outlook.MAPIFolder)
07 ProcessFolders(explorer.CurrentFolder)
08 End Sub
09
10 Public Sub ProcessFolders(ByVal folder As Outlook.MAPIFolder)
11 ...
12 End Sub
You need to ensure that the folders collection includes all the folders and subfolders within the selected Outlook folder.
Which code segment should you insert at line 11?
01 Private folders As List(Of Outlook.MAPIFolder)
02 Private explorer As Outlook.Explorer
03
04 Public Sub CreateCollection()
05 explorer = Application.ActiveExplorer()
06 folders = New List(Of Outlook.MAPIFolder)
07 ProcessFolders(explorer.CurrentFolder)
08 End Sub
09
10 Public Sub ProcessFolders(ByVal folder As Outlook.MAPIFolder)
11 ...
12 End Sub
You need to ensure that the folders collection includes all the folders and subfolders within the selected Outlook folder.
Which code segment should you insert at line 11?
Correct Answer: D
Vote an answer
You are creating a document-level solution for Microsoft Office Word 2003 by using Visual Studio Tools for the Microsoft Office System (VSTO). A transformation file is used to convert the solution document to an HTML file. The path to the transformation file is stored in a variable named filename. The Uniform Resource Identifier (URI) is stored in a variable named uri. An optional alias is stored in a variable named alias. You need to ensure that the solution document uses the transformation file that the user provides. Which code segment should you use?
Correct Answer: C
Vote an answer
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
Vote an answer
You are creating an application by using Visual Studio Tools for the Microsoft Office System (VSTO). The application contains the following objects:
a DataSet object named OrderData
a ServerDocument object named sd1
You write the following lines of code. (Line numbers are included for reference only.)
01 System.Text.StringBuilder stringIn =
02 new System.Text.StringBuilder ();
03 System.IO.StringWriter stringOut =
04 new System.IO.StringWriter ( stringIn );
05 ...
06 sd1.Save();
You need to store the contents of the OrderData object in the document cache for offline use.
Which code segment should you insert at line 05?
a DataSet object named OrderData
a ServerDocument object named sd1
You write the following lines of code. (Line numbers are included for reference only.)
01 System.Text.StringBuilder stringIn =
02 new System.Text.StringBuilder ();
03 System.IO.StringWriter stringOut =
04 new System.IO.StringWriter ( stringIn );
05 ...
06 sd1.Save();
You need to store the contents of the OrderData object in the document cache for offline use.
Which code segment should you insert at line 05?
Correct Answer: C
Vote an answer
The solution document refers to the following bugs:
bug123
Bug514
BUG512
The solution document must provide more details about a bug whenever a reference to the bug is found in the document.
You need to create a smart tag that identifies each bug.
Which code segment should you use?
bug123
Bug514
BUG512
The solution document must provide more details about a bug whenever a reference to the bug is found in the document.
You need to create a smart tag that identifies each bug.
Which code segment should you use?
Correct Answer: A
Vote an answer