VBA Tips - 101 Exemplos de código no Office 2010 - 101 Samples for Office 2010 Development


Inline image 1

Blog Office VBA | Blog Excel | Blog Access |


Microsoft Office 2010 tem as ferramentas necessárias para criar aplicativos poderosos. As aplicações abaixo, desenvolvidas com o Visual Basic for Applications (VBA), são amostras de códigos que podem ajudá-lo a criar seus próprios aplicativos que executam funções específicas ou servirem como ponto de partida para criar soluções mais complexas.


Cada amostra de código a seguir é composta de aproximadamente 5 a 50 linhas de código. Cada amostra inclui comentários descrevendo o código para que possa executá-los com os resultados esperados e os comentários explicarão como configurar o ambiente para que o código de exemplo seja executado.

Baixe todos os códigos em um único arquivo zip, ou clique em cada título individual para baixar o código VBA: 

Office 2010 101 Code Samples.zipExemplos de Código - MS Office 2010 101.zip
Excel 2010
Excel 2010: Add Icon Sets for Ranges Using Excel.AddIconSetCondition
Excel 2010: Apply Conditional Formatting Using the Excel.DataBar Method
Excel 2010: Change Colors to Indicate Values Above and Below Average in Ranges
Excel 2010: Communicate with PageSetup Using the Excel.PrintCommunication Method
Excel 2010: Create and Manipulate Custom Views Using Excel.CustomView Method
Excel 2010: Create Charts Events Programmatically
Excel 2010: Determine Open Add-Ins Using Excel.TestAddIn.IsOpen
Excel 2010: Display Top Ten Percent in Ranges Programmatically
Excel 2010: Display Unique Numbers in Ranges Using Excel.AddUnique
Excel 2010: Enable Removal of Duplicate Rows Using Excel.RemoveDuplicates
Excel 2010: Export Data to PDF or XPS Using the Excel.ExportAsFixedFormat Method
Excel 2010: Format Data Ranges Using the Excel.DisplayFormat Method
Excel 2010: Formatting Colors in Ranges Using Excel.AddColorScale
Excel 2010: Manipulate UI Properties Using Excel.ApplicationProperties
Excel 2010: Modify Display Properties of Tables Using Excel.ListObjectDisplay
Excel 2010: Remove Various Properties Using Excel.RemoveDocumentInformation
Excel 2010: Retrieve Information About Chart Points Using Excel.PointClass
Excel 2010: Show Properties of Chart Series Using Excel.SeriesProperties
Excel 2010: Show Properties of Exceeded Frames Using Excel.TextFrameProperties
Excel 2010: Show Properties of ListObject Using Excel.ListObjectTableStyles
Excel 2010: Show Properties of the Window Object Using Excel.WindowProperties
Excel 2010: Sort and Filter Programmatically Using Excel.ListObjectSortFilter
Excel 2010: Sort Data Programmatically Using Excel.WorksheetSort
Excel 2010: Use Properties of Sparkline Groups Using Excel.SparkLines
Excel 2010: Work with DataBodyRange and Total Properties Using Excel.ListColumn
Excel 2010: Work with Gradient Fill Features Using Excel.Gradient Method
Excel 2010: Work with Header and Footer Properties Using Excel.PagesAndPage
Excel 2010: Work with Hyperlinks Programmatically
Excel 2010: Work with Several Date Functions Using Excel.WorksheetFunctionDates

Excel 2010: Work with Various Properties Using Excel.PageSetup Object

Office 2010
Office 2010: Change Chart Layouts Using Office.Chart.ModifyChartLayout
Office 2010: Create Bar Charts Using Office.Chart.CreateSimpleChart
Office 2010: Modify Chart Axis Text Using Office.Chart.WorkWithAxisText
Office 2010: Modify Chart Legends Using Office.Chart.WorkWithLegend
Office 2010: Modify Chart Titles Using Office.Chart.WorkWithTitle


OneNote 2010
OneNote 2010: Create New Pages Programmatically Using OneNote.CreateOneNotePage
OneNote 2010: Manipulate Docking Using OneNote.fromVBA.DockWindow
OneNote 2010: Navigate to Objects in OneNote 2010 Using OneNote.NavigateTo
OneNote 2010: Open, Close, and Display OneNote 2010 Notebooks in a New Window
OneNote 2010: Output OneNote 2010 Page Content from VBA Sources
OneNote 2010: Output OneNote 2010 Page Content to PDF Files
OneNote 2010: Perform Keyword Searches in OneNote and Get Results in XML Format
OneNote 2010: Retrieve Attribute Data About Sections in OneNote 2010 Notebooks
OneNote 2010: Retrieve Data About Notebooks Using OneNote.fromVBA.ListNotebooks
OneNote 2010: Retrieve Information About Open OneNote 2010 Windows
OneNote 2010: Retrieve Metadata From Pages of OneNote 2010 Notebook Sections
OneNote 2010: Return Backup Folder Data Locations Using GetSpecialLocation


Outlook 2010
Outlook 2010: Access Lists of SharePoint Objects Using Outlook.PickerDialog
Outlook 2010: Create SMS and MMS Messages Using Outlook.MobileItem
Outlook 2010: Manipulate Items in Mail Conversations Using Outlook.Conversations


PowerPoint 2010
PowerPoint 2010: Add and Format Shapes Using PPT.ColorFormat.Brightness
PowerPoint 2010: Add Series of Application-Level Events Using PPT.NewEvents
PowerPoint 2010: Apply Themes & Backgrounds Using PPT.ApplyTheme.BackgroundStyle
PowerPoint 2010: Change Chart Locations Using PPT.InteractWithChartLocation
PowerPoint 2010: Control Animation Click Behavior Using PPT.SlideShowClicks
PowerPoint 2010: Convert Text into SmartArt Using PPT.ConvertTextToSmartArt
PowerPoint 2010: Copy Animation Using PPT.PickupAndApplyAnimation
PowerPoint 2010: Create Videos Programmatically
PowerPoint 2010: Display Media Control Properties
PowerPoint 2010: Export Slides as PPTX Files Using PPT.PublishSlides
PowerPoint 2010: Insert, Move, Get Section Counts Using PPT.WorkWithSections
PowerPoint 2010: Interact with Table Styles Using PPT.Table.ApplyStyle
PowerPoint 2010: Link Videos and Embedded Audio Files Using PPT.AddMedia
PowerPoint 2010: List SmartArt Names Using PPT.WorkWithSmartArt
PowerPoint 2010: Merge Two Decks into One Using PPT.MergeWithBaseline
PowerPoint 2010: Modify Aspects of Videos Using PPT.MediaFormatProperties
PowerPoint 2010: Resample and Reset Resolution Using PPT.ResampleMedia
PowerPoint 2010: Set Background Fill in Tables Using PPT.TableBackground
PowerPoint 2010: Set Banding and Scaling of Tables Using PPT.TableProperties
PowerPoint 2010: Use Custom XML Data Using PPT.CustomerDataDemo
PowerPoint 2010: View Properties of ShadowFormat Class Using PPT.Shadow
PowerPoint 2010: Work with FillFormat Texture Settings Using PPT.ShapeTexture
PowerPoint 2010: Work with Methods of Player Class Using PPT.WorkWithMediaPlayer


Visio 2010
Visio 2010: Add Containers and Connect Shapes in Visio 2010 Documents
Visio 2010: Add Containers to Visio Documents Using Visio.ContainerProperties
Visio 2010: Bind Two Shapes Together Using Visio.Page.DropCallout
Visio 2010: Manipulate Connected Shapes Using Visio.Page.DropConnected
Visio 2010: Manipulate Raster Export Resolution Settings
Visio 2010: Manipulate Shape Properties Using Visio.DropContainer
Visio 2010: Read and Write Raster Export Resolution Settings

Word 2010
Word 2010: Add Application-Level Events Using Word.New Application Events
Word 2010: Add Glow and Reflection Effects to Text
Word 2010: Add Picture Shapes and Format Cropping Using Word.PictureFormat.Crop
Word 2010: Apply a Quick Style Set Using Word.QuickStyleSets
Word 2010: Apply Themes and Styles Using Word.DocumentApplyThemeQuickStyle
Word 2010: Check-In Word 2010 Documents with Versioning on SharePoint Servers
Word 2010: Clear Formatting Using Word.SelectionClearFormatting
Word 2010: Compare Features of Two Documents Using Word.DemoCompareDocuments
Word 2010: Create a New Quick Style Set Using Word.SaveAsQuickStyleSet
Word 2010: Export and Import Text Fragments Using Word.RangeImportExportFragment
Word 2010: Ignore Punctuation, Match Prefixes and Suffixes, Clear Highlighting
Word 2010: List Combo Box Content Information Using Word.ContentControlLists
Word 2010: Make and Save Edits Concurrently Using Word.Coauthoring
Word 2010: Manipulate Check Box Controls Using Word.CheckBoxContentControl
Word 2010: Rotate and Warp Text Using Word.WorkWithTextFrame
Word 2010: Work with Auto-Hyphenation Using Word.ConvertAutoHyphens
Word 2010: Work with Nested Undo Records Using Word.NestedCustomUndoRecords
Word 2010: Work with Properties of Range Object Using Word.CharParagraphStyle
Word 2010: Work with the Undo Stack Using Word.CustomUndoRecord


Referências: MSDN


Tags: VBA, Office, Office 2010, MSDN, MSDN Library, Microsoft, solutions, tools, applications, developer, Microsoft Office 2010, technology