Online Access Free 70-543 Exam Questions
| Exam Code: | 70-543 |
| Exam Name: | TS: Visual Studio Tools for 2007 MS Office System (VTSO) |
| Certification Provider: | Microsoft |
| Free Question Number: | 120 |
| Posted: | Jun 02, 2026 |
You create an add-in for a Microsoft Office Outlook application by using Visual Studio Tools for the Microsoft Office System (VSTO). The add-in contains a reference to an Outlook folder in a variable named folder. You need to process only the e-mail messages within the folder. Which code segment should you use?
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?
You create an add-in for Microsoft Office Excel by using Visual Studio Tools for the Microsoft Office System (VSTO). You create the following method in the add-in.
Private Sub DisplayTotal(ByVal rng As Excel.Range) 'Display total End Sub
You write the following code segment in the startup event of the add-in.
Dim ws As Excel.Worksheet = CType _ (Globals.ThisAddIn.Application.ActiveSheet, Excel.Worksheet)
AddHandler ws.SelectionChange, AddressOf Me.ws_SelectionChange
The add-in must display the sum of the values in a selected range. If multiple ranges are selected, the add-in must display only the sum of the values in the first selected range.
You need to meet the outlined 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 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?
You are creating an application by using Visual Studio Tools for the Microsoft Office System (VSTO). The application edits a Microsoft Office Word 2007 document. The Word document contains two XML parts. The second custom XML part is used to audit changes to the first custom XML part. You need to ensure that the application adds a new element to the second XML part each time the value of a text node in the first XML part is changed. What should you do?