- #MS WORD DEVELOPER TAB HOW TO#
- #MS WORD DEVELOPER TAB PDF#
- #MS WORD DEVELOPER TAB CODE#
- #MS WORD DEVELOPER TAB PROFESSIONAL#
- #MS WORD DEVELOPER TAB DOWNLOAD#
To do this, click the Record Macro button on the Developer tab (see Figure 2). Let's record opening a file and adding the contents of that document into a new file. The developer tab will appear in the Ribbon.įigure 1** Enabling the Developer Tab in the Ribbon ** In the Word Options dialog box, check the box next to Show Developer tab in the Ribbon (see Figure 1) and click OK. Click the Office button, then click the Word Options button at the bottom of the menu. The first step in this process is to make sure the Developer tab is visible in Word so I am able to record the macros.
#MS WORD DEVELOPER TAB CODE#
Just to make the process more challenging, I'll convert the code from VBA to C# in the course of bringing it into VSTO. I'll convert the VBA code into VSTO code and put it into a Word add-in that I can use to assemble the final book. Finally, I'll look at the recorder not generating code at all. From there I'll take a closer look at workable but sub-optimal generated code. I'll start by using the recorder to generate the basic automation code.
I am going to illuminate the process of creating each of these pieces and the relative ability of the macro recorder to capture the code needed for each function. Like the revision marks, the comments were not something I wanted to see in the final product. Again, these should all have been removed during an earlier review, but a bit of automation to verify that is prudent.
#MS WORD DEVELOPER TAB HOW TO#
There were comments between the various editors about how things worked and how to standardize some of the terminology. Third, I needed to remove any remaining comments in the documents.
#MS WORD DEVELOPER TAB PROFESSIONAL#
The revision marks are supposed to all be accepted as part of the final checkout of the content, but if I missed some, the formatting of the revision marks would stand out in the final book, which wouldn't be very professional looking. During the editing process, I used revision marks (via the Track Changes feature in Word) to keep track of editing and other changes to the manuscript. Second, I wanted to make sure that all of the tracked changes in all of the documents had been accepted. Having so many individual files was great when working with Microsoft SharePoint® because it allowed for individual tracking of each task through the editorial workflow, but the sheer number made assembly a task best handled by automation. With more than 140 individual files representing 13 sections and 116 tasks, munging them together wasn't something I wanted to do by hand. For that to work, there were several steps I first needed to complete to get the manuscript ready.įirst, I had to assemble multiple files into one large document.
#MS WORD DEVELOPER TAB PDF#
The book is self-published, and I needed to output the manuscript from Word into a PDF that the printer could use. I was finishing my latest book, The SharePoint Shepherd's Guide for End Users. Recently, I found myself in a situation where this kind of VBA-to-VSTO conversion was perfect for the problem at hand.
I'll also write some simple code for some of the tasks that the macro recorder either just can't record or doesn't record in an optimal way. Then I will use the latest version of VSTO included with Visual Studio 2008 to wrap this code into a deployable Word add-in. In this column you'll see how to use Word to capture some VBA code that solves a basic problem. But switching from VBA to VSTO doesn't have to be a case of throwing the baby out with the bath water rather, it can be just a natural way to extend how you are already developing solutions in Office. NET-targeted code rather than VBA-and doing so means using Visual Studio® Tools for Office (VSTO). The ability to call Web services is just one among a number of reasons for wanting to write. NET Framework CLR, on the other hand, understands these technologies quite well. As such, it's no wonder that making a Web service call isn't well handled in the context of Visual Basic for Applications. In the early days of VBA, XML hadn't yet been invented, the Internet was in its infancy, and the first HTML pages were just beginning to appear. However, even with all of the capabilities of Visual Basic® for Applications (VBA), there are some things it just doesn't do very well.
And while writing a virus using a Word macro may be a dubious feat, it is a feat nonetheless. Macros have even demonstrated that they are functional enough to write viruses. For many years, the Office tools have featured macro recorders that weren't limited to simply replaying keystrokes but have been capable of writing code on the fly as well. It has been going on since the invention of macros, and there has been a full-fledged programming model within Microsoft® Office applications since the early 1990s.
#MS WORD DEVELOPER TAB DOWNLOAD#
Code download available at: OfficeSpace2008_05.exe(166 KB) Contentsĭocument automation isn't a new functionality by any means.