Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Controls and Components (How Do I in Visual Studio Tools for Office)

This page provides links to Help for commonly performed tasks that make use of the controls and components available in Microsoft Visual Studio 2005 Tools for the Microsoft Office System. To see other categories of key tasks covered by Visual Studio Tools for Office Help, see How Do I in Visual Studio Tools for Office.

How to: Add Controls to Office Documents

Describes how you can add Windows Forms controls to Excel 2003 and Word 2003 documents at design time or at run time.

How to: Hide Controls on Worksheets when Printing

Explains how to hide Windows Forms controls so that they do not appear when you print a Microsoft Office Excel 2003 worksheet.

How to: Resize Controls Within Worksheet Cells

Demonstrates how to set a Windows Forms control to automatically resize when the underlying worksheet cell is resized.

Word Controls Sample

Demonstrates how to access the events of managed controls on a Microsoft Office Word 2003 document from a Microsoft Visual Studio 2005 Tools for the Microsoft Office System project assembly.

Adding Controls to Office Documents at Run Time

Describes how to programmatically add Windows Forms controls and host controls to documents and worksheets.

How to: Add an Actions Pane to Word Documents

Describes how to create a user control in your Word project and display the control on an actions pane associated with your document.

How to: Add an Actions Pane to Excel Workbooks

Explains how to display an actions pane in an Excel 2003 workbook by adding a user control that you create in your project.

Walkthrough: Inserting Text into a Document from an Actions Pane

Steps you through the process of creating an actions pane that populates a Word 2003 document with text that the user types in the actions pane.

Walkthrough: Binding Data to Controls on an Excel Actions Pane

Describes how to add controls that are bound to a data source to an actions pane in Excel.

Walkthrough: Binding Data to Controls on a Word Actions Pane

Demonstrates binding data to controls on an actions pane in Word 2003, in which the controls demonstrate a master/detail relation between tables in a SQL Server database.

Walkthrough: Changing the Actions Pane According to User Context

Steps through the process of adding user controls to, and removing user controls from, an actions pane in Word in response to XMLNode events.

How to: Manage Control Layout on Actions Panes

Provides an example that shows how to write code to properly stack user controls on an actions pane if you are using multiple user controls.

Walkthrough: Binding Data to Controls on a Word Actions Pane

Demonstrates binding data to controls on an actions pane in Word 2003, in which the controls demonstrate a master/detail relation between tables in a SQL Server database.

Actions Pane Help Label Sample

Demonstrates a control that displays dynamic, context-sensitive help on an actions pane for a document that contains XML-mapped regions.

Actions Pane Subpane Control Sample

Demonstrates custom user controls on an actions pane, and includes a collapsible container control (the subpane control) that helps you organize controls on an actions pane.

How to: Resize Controls Within Worksheet Cells

Demonstrates how to set a Windows Forms control to automatically resize when the underlying worksheet cell is resized.

Walkthrough: Changing Document Formatting Using CheckBox Controls

Demonstrates how to use check box controls on a Word 2003 document to change text formatting.

Limitations of Windows Forms Controls on Office Documents

Describes the limitations of using Windows Forms controls on a document, including information about unsupported controls, unsupported methods and properties of controls, and the differences that exists when a control is placed on a document versus a Windows Form.

How to: Use Built-In Dialog Boxes in Word

Describes how to use the built-in dialog boxes in Word, which are exposed in the Dialogs collection of the Application object.

How to: Use Word Dialog Boxes in Hidden Mode

Demonstrates how to use the Execute method without calling the Display method to silently invoke the built-in dialog boxes in Word 2003 without displaying them to the user, which allows you to perform complex operations behind the scenes with one method call.

How to: Display a Dialog Box to Open Excel Files

Shows how to display the standard Open File dialog box from Excel 2003.

Office UI Customization Overview

Provides an overview of ways that you can customize your Office applications, including adding actions panes, menus, or toolbars, adding buttons to existing menus and toolbars or removing them, and creating shortcut menus.

How to: Create Office Menus Programmatically

Provides an example that creates a menu containing one menu command on the menu bar in Excel 2003.

How to: Create Office Toolbars Programmatically

Provides an example that programmatically creates a toolbar containing two buttons in Word 2003.

How to: Add Chart Controls to Worksheets

Shows the two ways to add Chart controls to your Excel 2003 worksheets: from within Excel, and programmatically at run time.

How to: Add ListObject Controls to Worksheets

Demonstrates several ways to add ListObject controls to Excel 2003 worksheets: from within Excel, from the Visual Studio Toolbox, from the Data Sources window, and programmatically.

How to: Resize ListObject Controls

Demonstrates how to change the size of a list in an Excel workbook by redefining its size in the Resize List dialog box, or by resizing it programmatically.

How to: Validate Data When a New Row is Added to a ListObject Control

Describes how to use the BeforeAddDataboundRow event to validate data before committing changes in the ListObject to the data source.

Understanding ListObject Column and Row Order Persistence

Describes how column and row order changes made to a ListObject are preserved.

How to: Handle Errors When a New Row is Added to a ListObject Control

Describes how to use the ErrorAddDataboundRow event to correct an error and attempt to add the row to the data source again.

How to: Add NamedRange Controls to Worksheets

Describes several ways to add named ranges to worksheets, including from within Excel, from the Visual Studio Toolbox, from the Data Sources window, and programmatically.

How to: Delete NamedRange Controls at Design Time

Describes how to use the Excel Define Name dialog box to delete NamedRange controls from an Excel 2003 worksheet.

How to: Resize NamedRange Controls

Shows how you can resize a named range by either redefining its size in the Define Name dialog box or resizing it programmatically.

Walkthrough: Programming Against Events of a NamedRange Control

Demonstrates how to add a NamedRange control to an Excel 2003 worksheet and program against its events.

How to: Locate NamedRange Controls on a Worksheet

Describes how to use the Name box or Properties window to locate NamedRange controls on a worksheet.

How to: Add XMLMappedRange Controls to Worksheets

Demonstrates that mapping an XML element to a cell in Excel 2003 causes Visual Studio Tools for Office to automatically add an XMLMappedRange control to the worksheet.

How to: Resize Bookmark Controls

Demonstrates the various ways to resize bookmark controls, including adding text to the bookmark, recreating the bookmark, and setting the start and end properties in the Properties window.

How to: Add Bookmark Controls to Word Documents

Describes several ways to add Bookmark controls: programmatically, from within Word, using the Visual Studio Toolbox, and using the Data Sources window.

Walkthrough: Creating Shortcut Menus for Bookmarks

Demonstrates how to write code in the BeforeRightClick event handler of a Bookmark control to display a shortcut menu when the user right-clicks text in a bookmark.

How to: Add XMLNode Controls to Word Documents

Explains that mapping a non-repeating XML schema element to a Word 2003 document causes Visual Studio Tools for Office to automatically add an XMLNode control to the document.

How to: Add XMLNodes Controls to Word Documents

Demonstrates that mapping a repeating XML schema element to a Word 2003 document causes Visual Studio Tools for Office to automatically add an XMLNodes control to the document.

Walkthrough: Changing the Actions Pane According to User Context

Steps you through the process of adding user controls to, and removing user controls from, an actions pane in Word in response to XMLNode events.

Host Items and Host Controls Overview

Provides information about host controls, which extend native Office objects such as ranges and add additional functionality including events and data-binding capabilities.

Word Host Controls

Provides links to information about adding, removing, and resizing host controls in Word.

Excel Host Controls

Provides links to information about adding, removing, and resizing host controls in Excel.

Programmatic Limitations of Host Items and Host Controls

Describes the limitations of host items and host controls, including information about programmatic creation and conversion between host controls and their underlying native Office objects.

Walkthrough: Programming Against Events of a NamedRange Control

Demonstrates how to add a NamedRange control to an Excel 2003 worksheet and program against its events.

Walkthrough: Changing Document Formatting Using CheckBox Controls

Demonstrates how to use check box controls on a Word 2003 document to change text formatting.

Walkthrough: Changing Worksheet Formatting Using CheckBox Controls

Demonstrates the basics of using check boxes on an Excel 2003 worksheet to change formatting.

Walkthrough: Displaying Text in a Text Box in a Document Using a Button

Demonstrates some basic principles of using buttons and text boxes on Word 2003 documents.

Walkthrough: Displaying Text in a Text Box in a Worksheet Using a Button

Shows the basics of using buttons and text boxes on Excel 2003 worksheets.

Walkthrough: Updating a Chart in a Document Using Radio Buttons

Steps you through the process of changing chart styles using radio buttons on a Word 2003 document.

Walkthrough: Updating a Chart in a Worksheet Using Radio Buttons

Shows the basics of changing chart styles using radio buttons on an Excel 2003 worksheet.

Walkthrough: Binding Data to Controls on an Excel Actions Pane

Describes how to add controls that are bound to a data source to an actions pane in Excel.

Walkthrough: Creating Shortcut Menus for Bookmarks

Demonstrates how to write code in the BeforeRightClick event handler of a Bookmark control to display a shortcut menu when the user right-clicks text in a bookmark.

Walkthrough: Binding Data to Controls on a Word Actions Pane

Demonstrates binding data to controls on an actions pane in Word 2003, in which the controls demonstrate a master/detail relation between tables in a SQL Server database.

How to: Interact with Windows Forms

Demonstrates how to add Windows Forms and other items to your Word and Excel projects just as you do in other projects in Visual Studio.

Walkthrough: Collecting Data Using a Windows Form

Shows how to open a Windows Form from an Excel 2003 worksheet, collect information from the user, and write that information into a worksheet cell.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.