Free Cheat-test Samples and Demo Questions Download
Adobe exams Adobe
Apple exams Apple
Avaya exams Avaya
Check Point exams Check Point
Cisco exams Cisco
Citrix exams Citrix
CIW exams CIW
CompTIA exams CompTIA
CWNP exams CWNP
EC-Council exams EC-Council
EMC exams EMC
Exin exams Exin
Fortinet exams Fortinet
GIAC exams GIAC
Hitachi exams Hitachi
HP exams HP
IBM exams IBM
Isaca exams Isaca
ISC exams ISC
ISEB exams ISEB
Juniper exams Juniper
LPI exams LPI
McAfee exams McAfee
Microsoft exams Microsoft
Oracle exams Oracle
PMI exams PMI
Riverbed exams Riverbed
SNIA exams SAP
Sun exams SAS
Symantec exams Symantec
VMware exams VMware
All certification exams

Microsoft 70-543 Exam - Cheat-Test.com

Free 70-543 Sample Questions:

Q: 1 You create a Microsoft Office Excel 2007 workbook.
You save the workbook in the C:\Data folder as an OpenXML package. You copy a file named Data.xml from the C:\Data folder to the CustomXML folder in the package. You rename the copied file to Item1.xml.
You add the following XML fragment to the Document.xml.rels file in the package.
< Relationship Id="rId1"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/CustomXML"
Target="..." / >
You need to ensure that the workbook can use the custom XML document part.
Which value should you use for the Target attribute in the XML fragment?
A. /Data/Data.xml
B. /CustomXML/Item1.xml
C. C:/Data/Data.xml
D. C:/Data/CustomXML/Item1.xml
Answer: B

Q: 2 You create a custom workbook for Microsoft Office Excel 2007 by using Visual Studio Tools for the Microsoft Office System (VSTO).
The workbook contains the following data:
Static data
Data that is imported from .xml files
The workbook displays the imported data by using mapped ranges.
You need to send only the imported data to a user.
What should you do?
A. Save the workbook as an .xml file, and then send the Workbook.xml file to the user.
B. Save the workbook as a .zip file, and then send the Workbook.xml file that is contained in the .zip file to the user.
C. From the Developer Ribbon user interface, export the XML data as an .xml file by using the Export command. Send the .xml file to the user.
D. From the Design Ribbon user interface, export the XML data to a Microsoft Windows SharePoint Services list by using the Export command. Send the link from the Microsoft Windows SharePoint Services list to the user.
Answer: C

Q: 3 You create a custom template for Microsoft Office Word 2007 by using Visual Studio Tools for the Microsoft Office System (VSTO).
You add two Text content controls named control1 and control2 to the template.
The template contains the following custom XML fragment.
< ProductList >
<Product id="1">
<Name> Chai </Name>
</Product>
<Product id="2">
<Name>Chang</Name>
</Product> </ ProductList >
You need to ensure that control1 displays the id of the Product and control2 displays the name of the Product.
Which code segment should you use?
A. control1.XMLMapping.SetMapping _ ("/ ProductList /Product/id", "", _
Me.ActiveWindow.Document.CustomXMLParts (1)) control2.XMLMapping.SetMapping _ ("/ ProductList
/Product/Name", "", _ Me.ActiveWindow.Document.CustomXMLParts (1))
B. control1.XMLMapping.SetMapping _ ("/ ProductList /Product/@id", "", _
Me.ActiveWindow.Document.CustomXMLParts (1)) control2.XMLMapping.SetMapping _ ("/ ProductList
/Product/Name", "", _ Me.ActiveWindow.Document.CustomXMLParts (1))
C. control1.XMLMapping.SetMapping _ ("/ ProductList /Product[1]/id", "", _
Me.ActiveWindow.Document.CustomXMLParts (1)) control2.XMLMapping.SetMapping _ ("/ ProductList
/Product[1]/Name", "", _ Me.ActiveWindow.Document.CustomXMLParts (1))
D. control1.XMLMapping.SetMapping _ ("/ ProductList /Product[1]/@id", "", _
Me.ActiveWindow.Document.CustomXMLParts (1)) control2.XMLMapping.SetMapping _ ("/ ProductList
/Product[1]/Name", "", _ Me.ActiveWindow.Document.CustomXMLParts (1))
Answer: D
Q: 4 You are creating a custom template for Microsoft Office Word 2007 by using
Visual Studio Tools for the Microsoft Office System (VSTO).
The template contains a custom XML part that consumes data from an XML source. The XML source contains the following XML fragment.
<Products> mother board, memory, hard drive,
floppy drive, DVD drive </Products>
You need to display the Products element as a comma-separated list within a paragraph of text.
Which code segment should you use?
A. Application.ActiveDocument.ContentControls.Add _
(WdContentControlType.wdContentControlRichText, range)
B. Application.ActiveDocument.ContentControls.Add _ (WdContentControlType.wdContentControlText, range)
C. Application.ActiveDocument.ContentControls.Add _
(WdContentControlType.wdContentControlDropdownList, range)
D. Application.ActiveDocument.ContentControls.Add _
(WdContentControlType.wdContentControlCombobox, range)
Answer: B

Q: 5 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?
A. Me.Application.XMLNamespaces.Add (filename, uri , [alias], True)
B. Me.XMLSchemaReferences.Add ( uri , [alias], filename, True)
C. Me.XMLNodes.Add (Name:=filename, Namespace:="")
D. Me.XMLSaveThroughXSLT = filename
Answer: D

Q: 6 You create a Microsoft Office Word 2007 document. The document will use data from a file named Data1.xml. The file is located in the C:\Data folder. You create an application by using Visual Studio Tools for the Microsoft Office System (VSTO). You need to ensure that the application adds the data from the Data1.xml file to the document. Which code segment should you use?
A. document.CustomXMLParts.Add(XML:="") document.CustomXMLParts(1).Load("C:\data1.xml")
B. Dim control As ContentControl control = document.ContentControls.Add _ (
WdContentControlType.wdContentControlText, range) control.XMLMapping.SetMapping( _ "C:\data1.xml", "", document.CustomXMLParts(1))
C. Dim xmlPart As CustomXMLPart xmlPart = document.CustomXMLParts.Add(XML:="")
xmlPart.DocumentElement.AppendChildNode( _ "xmlPart", uri,
MsoCustomXMLNodeType.msoCustomXMLNodeElement, _ "data1.xml")
D. Dim control As ContentControl control = document.ContentControls.Add( _
WdContentControlType.wdContentControlText, range) control.XMLMapping.SetMapping( _ "/data1.xml", "", document.CustomXMLParts(1))
Answer: A

Q: 7 You are creating a document-level solution for Microsoft Office Word 2003 by using Visual Studio Tools for the Microsoft Office System (VSTO). The customization contains a predefined schema to validate the data that users add. The path to the schema is stored in a variable named filename. The Unique Resource Identifier (URI) for the schema is stored in a variable named uri. The alias for the schema is stored in a variable named alias. You need to ensure that the schema that the user selects is applied to the solution document. Which code segment should you use?
A. Me.XMLNodes.Add (filename, "", uri )
B. Me.Application.XMLNamespaces.Add (filename, uri , [alias], True)
C. Me.XMLSchemaReferences.Add ( uri , [alias], filename, True)
D. Dim doc As ThisDocument = Globals.ThisDocument Me.Application.XMLNamespaces.Item(uri). _
AttachToDocument(doc)
Answer: C

Q: 8 You create an application by using Visual Studio Tools for the Microsoft Office System (VSTO). The application modifies a Microsoft Office Excel custom workbook. The custom workbook displays the data that is contained in an XML file named Salesorder.xml. The Salesorder.xml file uses an XML schema that is stored in a file named Salesorder.xsd. Both the Salesorder.xml file and the Salesorder.xsd file are located in the C:\Data folder. You need to ensure that the data in the Salesorder.xml file is available for mapping. Which code segment should you use?
A. Dim map As Excel.XmlMap = _ Me.XmlMaps.Add ("C:\Data\Salesorder.xsd", "Root") Me.XmlImport ("C:\Data\Salesorder.xml", map, _ True, Globals.Sheet1.Range("A1"))
B. Dim map As Excel.XmlMap = _ Me.XmlMaps.Add ("C:\Data\Salesorder.xml", "Root") Me.XmlImport ("C:\Data\Salesorder.xsd", map, _ False, Globals.Sheet1.Range("A1"))
C. Dim map As Excel.XmlMap = _ Me.XmlMaps.Add ("C:\Data\Salesorder.xsd", "Root")
Me.XmlImportXml ("C:\Data\Salesorder.xml", map, _ True, Globals.Sheet1.Range("A1"))
D. Dim map As Excel.XmlMap = _ Me.XmlMaps.Add ("C:\Data\Salesorder.xml", "Root")
Me.XmlImportXml ("C:\Data\Salesorder.xsd", map, _ False, Globals.Sheet1.Range("A1"))
Answer: A

Q: 9 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?
A. control.LockContentControl = True control.LockContents = False
B. control.LockContentControl = True control.LockContents = True
C. control.LockContentControl = False control.LockContents = True
D. control.LockContentControl = False control.LockContents = False
Answer: A

Q: 10 You create a Microsoft Office Word 2007 document.
The OpenXML package for the document is shown in the exhibit. (Click the Exhibit button.)
You create an XML file named item2.xml. The item2.xml file uses the same schema as the item1.xml file.
You add the item2.xml file to the OpenXML package.
You need to ensure that the document uses data from the item2.xml file instead of the item1.xml file.
What should you do?
A. Delete the item1.xml file.
B. Delete the itemProps1.xml file.
C. Create a file named itemProps2.xml that marks the item2.xml file as a data store.
D. Create a file named item2.xml.rels that creates a relationship between the item2.xml file and the itemProps1.xml file.
Answer: D

Q: 11 You are creating a document-level solution for Microsoft Office Word 2003 by using Visual Studio Tools for the Microsoft Office System (VSTO).
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?
A. Dim tag As SmartTag = New SmartTag _ ("http: / / MySmartTag/ST#BugRecognizer", "Bug Recognizer")
Dim regex As Regex = _ New Regex("bug\d\d\d", RegexOptions.IgnoreCase) tag.Expressions.Add(regex)
B. Dim tag As SmartTag = New SmartTag _ ("http: / / MySmartTag/ST#BugRecognizer", "Bug Recognizer")
Dim regex As Regex = New Regex("[B|b][U|u][G|g]000") tag.Expressions.Add(regex)
C. Dim tag As SmartTag = New SmartTag _ ("http: / / MySmartTag/ST#BugRecognizer", "Bug Recognizer")
tag.Terms.Add("bug\d\d\d")
D. Dim tag As SmartTag = New SmartTag _ ("http: / / MySmartTag/ST#BugRecognizer", "Bug Recognizer")
tag.Terms.Add("[B|b][U|u][G|g]000")
Answer: A

Q: 12 You create a document-level solution for Microsoft Office Word 2003 by using Visual Studio Tools for the Microsoft Office System (VSTO). You create a user control named MyUserControl.
You write the following code segment for your document class. (Line numbers are included for reference only.)
01 Private Sub ThisDocument_Startup _
(ByVal sender As Object, ByVal e As System.EventArgs)
02 Dim uc As MyUserControl = New MyUserControl()
03 ... 04 End Sub
You need to display userControl in the actions pane.
Which code segment should you insert at line 03?
A. Me.ActionsPane.Controls.AddRange _
(New Control() {uc, New MyUserControl()})
B. Me.ActionsPane.Controls.Add(uc)
C. Me.Controls.AddControl(uc, 100, 100, 100, 100, "Action s Pane")
D. Me.ActionsPane.Parent.Controls.Add(uc)
Answer: B

Q: 13 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.
Dim tag As SmartTag = New _
SmartTag("http:// MySmartTag/ST#MySmartTag", "My Tag")
tag.Terms.Add("Bug")
tag.Terms.Add("Error")
tag.Terms.Add("Issue")
Dim action As Action = New Action("Add Reference")
tag.Actions = New ActionBase() {action}
AddHandler action.Click, AddressOf Me.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. Private Sub action_Click ( _ ByVal sender As Object, ByVal e As ActionEventArgs ) e.Range.Text =
"Reference: " & e.Text End Sub
B. Private Sub action_Click ( _ ByVal sender As Object, ByVal e As ActionEventArgs ) e.Range.Text =
"Reference: " & e.Range.XML (False).ToString() End Sub
C. Private Sub action_Click ( _ ByVal sender As Object, ByVal e As ActionEventArgs ) e.Range.Text =
"Reference: " & e.Properties.Read ("Text") End Sub
D. Private Sub action_Click ( _ ByVal sender As Object, ByVal e As ActionEventArgs ) e.Properties.Write
( e.Range.Text , "Reference: " & e.Range.Text ) End Sub
Answer: A

Q: 14 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.
Private Sub Handle_Change ( ByVal Target As Excel .Range )
...
End Sub
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?
A. Dim rng As Excel.Range = Me.Range ("A1", "E5") Dim rng1 As
Microsoft.Office.Tools.Excel.NamedRange = _ Me.Controls.AddNamedRange ( rng , " MyRange ")
AddHandler rng1.Change, AddressOf Me.Handle_Change
B. Dim rng As Excel.Range = Me.Range ("A1", "E5") Dim rng1 As
Microsoft.Office.Tools.Excel.NamedRange = _ Me.Controls.AddNamedRange ( rng , " MyRange ")
AddHandler rng1.SelectionChange, AddressOf Me.Handle_Change
C. Dim rng As Excel.Range = Me.Range ("A1", "E5") AddHandler Change, AddressOf Me.Handle_Change
D. Dim rng As Excel.Range = Me.Range ("A1", "E5") AddHandler SelectionChange , AddressOf
Me.Handle_Change
Answer: A

Q: 15 You are creating a document-level solution for Microsoft Office Word 2003 by using Visual Studio Tools for the Microsoft Office System (VSTO).
The solution must meet the following requirements:
The solution must save the document.
The users who do not have Microsoft VSTO Runtime installed can open the document.
You need to ensure that the solution meets the requirements.
Which code segment should you use?
A. Me.RemoveTheme () Me.Save ()
B. Me.RemoveCustomization () Me.Save ()
C. Me.RejectAllRevisionsShown () Me.Save ()
D. Me.ReloadAs ( Microsoft.Office.Core.MsoEncoding . _ msoEncodingAutoDetect ) Me.Save ()
Answer: B

Q: 16 You create a document-level solution by using Visual Studio Tools for the Microsoft Office System (VSTO). The solution uses an assembly named MyAssembly. MyAssembly is located in the C:\Assemblies\ folder. A Microsoft Office Word 2003 document named MyWordDocument is located in the C:\Documents\ folder. You need to associate MyAssembly with MyWordDocument if managed extensions are enabled in MyWordDocument. Which code segment should you use?
A. Dim document As String = "C:\Documents\MyWordDocument.doc" Dim assembly As String =
"C:\Assemblies\MyAssembly.dll" If ServerDocument.IsCustomized (document) Then 'Add document customization End If
B. Dim document As String = "C:\Documents\MyWordDocument.doc" Dim assembly As String =
"C:\Assemblies\MyAssembly.dll" If ServerDocument.IsCacheEnabled (document) Then 'Add document customization End If
C. Dim document As String = "C:\Documents\MyWordDocument.doc" Dim assembly As String =
"C:\Assemblies\MyAssembly.dll" If ServerDocument.IsCustomized (assembly) Then 'Add document customization End If
D. Dim document As String = "C:\Documents\MyWordDocument.doc" Dim assembly As String =
"C:\Assemblies\MyAssembly.dll" If ServerDocument.IsCacheEnabled (assembly) Then 'Add document customization End If
Answer: A

Q: 17 You are creating a document-level solution for Microsoft Office Excel 2003 by using Visual Studio Tools for the Microsoft Office System (VSTO). The customized workbook contains five worksheets. You add a LinkLabel control named Label to the first worksheet of the workbook. You need to create a LinkClicked event handler that displays the next worksheet in the workbook. Which code segment should you use?
A. Private Sub Label_LinkClicked(ByVal sender As Object, _ ByVal e As LinkLabelLinkClickedEventArgs)
Dim book As Excel.Workbook = CType(Me.Site, Excel.Workbook) Dim sheet As Excel.Worksheet = _
CType(book.Sheets((Me.Index + 1)), Excel.Worksheet) s heet.Activate() End Sub
B. Private Sub Label_LinkClicked(ByVal sender As Object, _ ByVal e As LinkLabelLinkClickedEventArgs)
Dim book As Excel.Workbook = CType(Me.Parent, Excel.Workbook) Dim sheet As Excel.Worksheet = _
CType(book.Sheets((Me.Index + 1)), Excel.Worksheet) sheet.Activate() End Sub
C. Private Sub Label_LinkClicked(ByVal sender As Object, _ ByVal e As LinkLabelLinkClickedEventArgs)
Dim book As Excel.Workbook = CType(Me.Site, Excel.Workbook) D im sheet As Excel.Worksheet = _
CType(book.Sheets((Me.Index + 1)), Excel.Worksheet) sheet.ShowAllData() End Sub
D. Private Sub Label_LinkClicked(ByVal sender As Object, _ ByVal e As LinkLabelLinkClickedEventArgs)
Dim book As Excel.Workbook = CType(Me.Parent, Excel.Workbook) Dim sheet As Excel.Worksheet = _
CType(book.Sheets((Me.Index + 1)), Excel.Worksheet) sheet.ShowAllData() End Sub
Answer: B

Q: 18 You create a document-level solution for Microsoft Office Excel 2003 by using Visual Studio Tools for the Microsoft Office System (VSTO). The customized workbook contains a NamedRange control named MyRange. MyRange is associated with cell D1. You need to change MyRange to use the cells A1 and B1. Which code segment should you use?
A. MyRange.Formula = "=$A$1:$B$1"
B. MyRange.RefersTo = "=$A$1:$B$1"
C. MyRange.RefersTo = "A1:B1"
D. MyRange.Formula = "A1:B1"
Answer: B

Q: 19 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?
A. Dim button As Button = _ Me.Controls.AddButton (1, 1, 0, 0, " MyButton ") button.Dock =
DockStyle.Fill
B. Dim button As Button = _ Me.Controls.AddButton (1, 1, 1, 1, " MyButton ") button.Dock =
DockStyle.None
C. Dim rng As Excel.Range = Me.Range ("A", "1") Me.Controls.AddButton ( rng , " MyButton ")
D. Dim rng As Excel.Range = Me.Range ("A1") Me.Controls.AddButton ( rng , " MyButton ")
Answer: D

Q: 20 You create a document-level solution for Microsoft Office Word 2003 by using Visual Studio Tools for the Microsoft Office System (VSTO). The actions pane of the solution document contains two user controls. The user controls must be displayed in the following ways:
In a horizontal display, the controls must be placed next to each other.
In a vertical display, the controls must be placed one below the other.
You need to ensure that the solution meets the requirements.
Which code segment should you use?
A. Private Sub ActionsPane_OrientationChanged _ (ByVal sender As Object, ByVal e As EventArgs) If
Me.ActionsPane.Orientation = Orientation.Horizontal Then Me.ActionsPane.StackOrder = _
Microsoft.Office.Tools.StackStyle.FromLeft Else Me.ActionsPane.StackOrder = _
Microsoft.Office.Tools.StackStyle.FromTop End If End Sub
B. Private Sub ActionsPane_OrientationChanged _ ( ByVal sender As Object, ByVal e As EventArgs) If
Me.ActionsPane.Orientation = Orientation.Horizontal Then Me.ActionsPane.Controls(1).Dock =
DockStyle.Left Me.ActionsPane.Controls(1).Dock = DockStyle.Right Else
Me.ActionsPane.Controls(1).Dock = DockStyle.Top Me.ActionsPane.Controls(1).Dock = DockStyle.Bottom
End If End Sub
C. Private Sub ActionsPane_OrientationChanged _ (ByVal sender As Object, ByVal e As EventArgs) If
Me.ActionsPane.Orientation = Orientation.Horizontal Then Me.ActionsPane.Dock = DockStyle.Left Else
Me.ActionsPane.StackOrder = DockStyle.Top End If End Sub
D. Private Sub ActionsPane_OrientationChanged _ (ByVal sender As Object, ByVal e As EventArgs) If
Me.ActionsPane.Orientation = Orientation.Horizontal Then Me.ActionsPane.Controls(1).Anchor =
AnchorStyles.Left Me.ActionsPane.Controls(1).Anchor = AnchorStyles.Right Else
Me.ActionsPane.Controls(1).Anchor = AnchorStyles.Top Me.ActionsPane.Controls(1).Anchor =
AnchorStyles.Bottom End If End Sub
Answer: A

Q: 21 You are creating a document-level solution for Microsoft Office Word 2003 by using Visual Studio Tools for the Microsoft Office System (VSTO). The document is customized to add a toolbar with custom functionality. You write the following lines of code in the Startup event of the
ThisDocument class.
Dim toolbar As Office.CommandBar = Me.Application . _
CommandBars.Add (Name:=" MyToolBar ", _
Position:= Office.MsoBarPosition.msoBarTop , Temporary:=False)
Dim button As Office.CommandBarButton = _
CType ( too lbar.Controls.Add ( _
Type:= Office.MsoControlType.msoControlButton , _
Temporary:=False), Office.CommandBarButton )
Dim btnClick As _
Office._CommandBarButtonEvents_ClickEventHandler = _
AddressOf Me.button_Click
AddHandler button.Click , AddressOf Me.b utton_Click
The event handler for the button does not execute every time CommandBarButton is clicked.
You need to ensure that the event handler executes every time CommandBarButton is clicked.
What should you do?
A. Set the Enabled property of the CommandBarButton button object to True.
B. Set the OnAction property of the CommandBarButton button object to Click.
C. Change the scope of the CommandBarButton button variable to a class-scoped variable.
D. Change the scope of the ._CommandBarButtonEvents_ClickEventHandler delegate btnClick variable to a class-scoped variable.
Answer: C

Q: 22 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.
Private Sub NotifyChanges _
(ByVal Sh As Object, ByVal Target As Excel.Range)
'Notify changes
End Sub
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?
A. AddHandler Globals.ThisWorkbook.SheetSelectionChange, _ AddressOf Me.NotifyChanges
B. AddHandler Globals.ThisWorkbook.SheetChange, _ AddressOf Me.NotifyChanges
C. AddHandler Globals.ThisWorkbook.Application.SheetChange, _ AddressOf Me.NotifyChanges
D. AddHandler Globals.ThisWorkbook.Application. _ SheetSelectionChange, Add ressOf Me.NotifyChanges
Answer: B

Q: 23 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 Sub GetDataIsland(ByVal DocPath As String)
02 Dim sd As ServerDocument = New ServerDocument(DocPath)
03 Dim HC As CachedDataHostItemCollection = _
04 sd.CachedData.HostItems
05 If HC.Count > 0 AndAlso _
06 ...
07 End If 08 End Sub
You need to load all the data islands of the WSS_DataSet class from the local document cache.
Which code segment should you insert at line 06?
A. HC("WordAddInNS.WordExcelIsland").CachedData.Contains _ ( "WSS_DataSet") Then
B. HC("WordAddInNS.WordExcelIsland").CachedData.Contains _ ( "WordAddInNS.WSS_DataSet") Then
C. HC("WordAddInNS.WordExcelIsland").Equals("WSS_DataSet") Then
D. HC("WordAddInNS.WordExcelIsland").Equals _ ( "WordAddInNS.WSS_DataSet") Then
Answer: A

Q: 24 You are creating a document-level solution for Microsoft Office Word 2003 by using Visual Studio Tools for the Microsoft Office System (VSTO).
The solution will insert an XML data island in a Word document. The data island contains the following XML fragment.
< customer id="01AF" >
< region district="Northwest" > < /region >
< /customer >
You bind the data island to an XMLNode instance named xln.
You need to update the region element with the following data.
< customer id="01AF" >
< region district="Southwest" > California < /region >
< /customer >
Which code segment should you use?
A. If xln.ParentNode.NodeValue = "customer" _ AndAlso xln.NodeText = "Northwest" Then
xln.NodeText = "Southwest" xln.ChildNodes (1).Text = " California " End If
B. If xln.ParentNode.NodeValue = "customer" _ AndAlso xln.NodeValue (0). CompareTo ("Northwest") = 0
Then xln.NodeText = " California " xln.ChildNodes (1).Text = "Southwest" End If
C. If xln.ChildNodes (0).Text = "customer" _ AndAlso xln.NodeText = "Northwest" Then xln.NodeText =
"Southwest" xln.ChildNodes (1).Text = "California" End If
D. If xln.ChildNodes (0).Text = "customer" _ AndAlso xln.NodeValue (0). CompareTo ("Northwest") = 0
Then xln.NodeText = " California " xln.ChildNodes (1).Text = "Southwest" End If
Answer: A

Q: 25 You are creating an add-in project for Microsoft Office by using Visual Studio Tools for the Microsoft Office System (VSTO). You create a data source named ContactRef from a class in an assembly. The author digitally signs a new version of the assembly. You need to ensure that the add-in can load a new version of the assembly. What should you do?
A. Add a PublicKeyToken element to the ContactRef.datasource file.
B. Add a PublicKeyToken attribute to the ContactRef.datasource file.
C. Add the public key token to the TypeInfo element in the ContactRef.datasource file.
D. Add the public key token to the GenericObjectDataSource element in the ContactRef.datasource file.
Answer: B

Q: 26 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?
A. Dim lh As LONDON.Service1 = New LONDON.Service1() Dim ds As DataSet = New DataSet()
ds.DataSetName = lh.GetCustomers.GetXml()
B. Dim ds As DataSet = New DataSet() Dim mappings As ArrayList = New ArrayList()
LONDON.Service1.GenerateXmlMappings( _ ds.GetType(), mappings)
C. Dim lh As LONDON.Service1 = New LONDON.Service1() Dim ds As DataSet = lh.GetCustomers()
D. Dim lh As LONDON.Service1 = New LONDON.Service1() Dim ds As DataSet = New DataSet()
ds.GetXml()
Answer: C

Q: 27 You are creating an add-in for Microsoft Office Excel by using Visual Studio Tools for the Microsoft Office System (VSTO). The add-in must connect to a remote database to retrieve data. The structure of the remote database is shown in the exhibit. (Click the Exhibit button.)
You write the following lines of code. (Line numbers are included for reference only.)
01 Partial Friend NotInheritable Class Settings
02 Inherits System.Configuration.ApplicationSettingsBase
03 < System.Configuration.SpecialSettingAttribute ( _
04 System.Configuration.SpecialSetting.ConnectionString )>
05 ...
06 Public ReadOnly Property ExcelSQLConnectionString () _
As String
07 Get
08 Return Convert.ToString (Me(" ExcelSQLConnectionString "))
09 End Get
10 End Property
11 End Class
You need to connect to the remote database by using the security context of the current user.
Which code segment should you insert at line 05?
A. < System.Configuration.DefaultSettingValueAttribute ( _ "Data Source= EXCELSQL;Initial Catalog=
AdventureWorks ;" & _ "Integrated Security=True")> _
B. < System.Configuration.DefaultSettingValueAttribute ( _ "Data Source= EXCELSQL.AdventureWorks ;"
& _ "Initial Catalog= Production;Integrated Security=True")> _
C. < System.Configuration.DefaultSettingValueAttribute ( _ "Data Source= EXCELSQL.AdventureWorks ;"
& _ "Initial Catalog= Product;Integrated Security=True")> _
D. < System.Configuration.DefaultSettingValueAttribute ( _ "Data Source= EXCELSQL ;InitialCatalog =
AdventureWorks ." & _ " Production.Product;Integrated Security=True")> _
Answer: A

Q: 28 You are creating an add-in for Microsoft Office Word by using Visual Studio Tools for the Microsoft Office System (VSTO).
You create the following objects in the add-in:
a DataSource object named ExpenseBindingSource
a TableAdaptor object named ExpenseTableAdapter
a DataSet object named ExpenseData
a CachedDataItem object named DI
The ExpenseData object contains a table named Expenses. The DI object contains a data island of the ExpenseData object.
You need to ensure that any changes in the content of the DI object are updated in the Expenses table.
Which code segment should you use?
A. Dim schemaReader As System.IO.StringReader = _ New System.IO.StringReader(DI.Schema) Dim
xmlReader As System.IO.StringReader = _ New System.IO.StringReader(DI.Xml)
ExpenseData.ReadXmlSchema(schemaReader) ExpenseData.ReadXml(xmlReader) ...
ExpenseBindingSource.Add(ExpenseData) ExpenseTableAdapter.Update(ExpenseData.Expense)
B. Dim schemaReader As System.IO.StringReader = _ New System.IO.StringReader(DI.Schema) Dim
xmlReader As System.IO.StringReader = _ New System.IO.StringReader(DI.Xml)
ExpenseData.ReadXmlSchema(schemaReader) ExpenseData.ReadXml(xmlReader) ...
ExpenseBindingSource.EndEdit() ExpenseTableAdapter.Update(ExpenseData.Expense)
C. Dim XMLR As XmlReader = _ XmlReader.Create("books.xml", settings)
XMLR.ReadStartElement(DI.Schema) XMLR.ReadValueChunk(DI.Xml.ToCharArray(), 0, DI.Xml.Length)
ExpenseData.ReadXmlSchema(XMLR.NamespaceURI) ExpenseData.ReadXml(XMLR.Value(0).ToString())
... ExpenseBindingSource.Add(ExpenseData) ExpenseTableAdapter.Update(ExpenseData.Expense)
D. Dim XMLR As XmlReader = _ XmlReader.Create("books.xml", settings)
XMLR.ReadStartElement(DI.Schema) XMLR.ReadValueChunk(DI.Xml.ToCharArray(), 0, DI.Xml.Length)
ExpenseData.ReadXmlSchema(XMLR.NamespaceURI) ExpenseData.ReadXml(XMLR.Value(0).ToString())
... ExpenseBindingSource.EndEdit() ExpenseTableAdapter.Update(ExpenseData.Expense)
Answer: B

Q: 29 You are creating a document-level solution for Microsoft Office Word 2003 by using Visual Studio Tools for the Microsoft Office System (VSTO).
The solution contains a DataRow named custrow. A serialization of custrow contains the following XML fragment.
< ClientProjects >
...
< description > Upgrade from Windows XP < /description >
...
< / ClientProjects >
The solution will create an XMLNode control named ProjectDescriptionNode in a Word document.
You need to ensure that the text in the description element is displayed as unformatted text.
Which code fragment should you use?
A. ProjectDescriptionNode.NodeText = _ custrow("description").ToString()
B. ProjectDescriptionNode.Text = _ custrow("description").ToString()
C. ProjectDescriptionNode.PlaceholderText = _ custrow("description").ToString()
D. ProjectDescriptionNode.NodeValue = _ custrow("description").ToString()
Answer: A

Q: 30 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?
A. Dim sd As ServerDocument = New ServerDocument (path) Dim D As CachedDataHostItem = _
sd.CachedData.HostItems (" DocumentCache ") For Each CDI As CachedDataItem In D.CachedData Dim sw
As StreamWriter = _ File.CreateText (path & CDI.Id & ".xml") sw.WriteLine ( CDI.Xml ) sw.Close ()
Next
B. Dim sd As ServerDocument = New ServerDocument (path) Dim D As CachedDataHostItem = _
sd.CachedData.HostItems (" DocumentCache ") For Each CDI As CachedDataItem In D.CachedData Dim sw
As StreamWriter = _ File.CreateText (path & CDI.Id & ".xml") sw.WriteLine ( CDI.DataType.ToString ())
sw.Close () Next
C. Dim sd As ServerDocument = New ServerDocument (path) For i As Integer = 1 To
sd.CachedData.HostItems.Count Dim sw As StreamWriter = _ File.CreateText (path &
sd.CachedData.HostItems ( i ).Id & _ ".xml") sw.WriteLine ( sd.CachedData.HostItems ( i ). CachedData (
i ).Xml) sw.Close () Next
D. Dim sd As ServerDocument = New ServerDocument (path) For i As Integer = 1 To
sd.CachedData.HostItems.Count Dim sw As StreamWriter = _ File.CreateText (path &
sd.CachedData.HostItems ( i ).Id & _ ".xml") sw.WriteLine ( sd.CachedData.HostItems ( i ). _
CachedData ( i ). DataType.ToString ()) sw.Close () Next
Answer: A


© 2014 Cheat-Test.com, All Rights Reserved