Follow us on Twitter
Follow us in Facebook
Office Dev Content
SharePoint Dev Content
Blogs for Office developers > Office and Office 365 dev blog
Developers and power users new to programming with the Excel object model take note: there is a new series of videos that show how to create, edit, and run macros in Excel 2010: Save time by creating and running macros in Excel 2010!
This set of 4 videos ranges in length from 3 to 5 minutes each. For our purpose of learning an object model, I'd like to call out the first two videos in the set: the first video in the series shows how to record a macro that fills a series of cells in a workbook. The second video shows how to view and edit the Visual Basic for Applications (VBA) code for the recorded macro in the Visual Basic editor. In general, for Office client applications that support macro recording (Excel, Visio, Word), using the Visual Basic editor to look at the code of a recorded macro is a convenient way to learn the application's object model, and how to write the code for a task that maps to a series of actions in the application's user interface. You can use the code for the recorded macro as a baseline, and extend its functionality by writing further code to achieve your purpose. Recently I used a similar approach to learn how to use the Word object model to search for a string in an email message. I tried recording a Word macro of searching for a string in a Word document. Then I adapted the code and wrote the macro for the blog post How to Search for a String in an Outlook Email Message and Automate a Reply that Contains the String.
If you are new to programming with the Excel object model, or even Visio or Word, do take a look at the training videos and consider approaching the object models through recorded macros!