SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 279 | Next

Jim DeMarco

"Pro Excel 2007 VBA"

Shapes.Paste
.Top = top
.Left = left
.Width = width
End With
Next i
Set oShape = Nothing
End Sub
CHAPTER 8 n OFFICE INTEGRATION 311
All that??™s left to do now is modify our calling procedure, MakePowerPointPresentation, and
then run it.
13. Navigate to the MakePowerPointPresentation subroutine.
14. Replace this line of code:
CreateChartSlides
with this line:
CreateChartSlidesText
15. Place the insertion point anywhere inside the MakePowerPointPresentation procedure.
16. Click the Run button on the VBE toolbar or press F5.
17. Once the message box appears, make PowerPoint the active window if it??™s not already.
Figures 8-15 through 8-17 show the chart slides with the descriptive text.
Figure 8-15. Baked Goods & Mixes chart slide with text
CHAPTER 8 n OFFICE INTEGRATION 312
Figure 8-16. Beverages chart slide with text
Figure 8-17. Candy chart slide with text
18. Return to the Excel window.
19. Click OK on the message box to finish running the code.
CHAPTER 8 n OFFICE INTEGRATION 313
Summary
In this chapter, we took a look at automating other Microsoft Office products using Excel 2007
VBA. Office automation is a powerful concept that allows us to interact with Office applications
for purposes of sharing information, creating documents, and creating workflow
processes.
We are not limited to automating Microsoft Office products, however. Many applications
support VBA, including some non-Microsoft products. For instance, versions 9 and later of
WordPerfect support VBA, and Novell has added VBA support to the open source office suite
OpenOffice.


Pages:
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291