How To Use MFC to Retrieve a List of Macro Names in an Office Document (274680)
The information in this article applies to:
- Microsoft Office Word 2003
- Microsoft Word 2002
- Microsoft Word 2000
- Microsoft Office PowerPoint 2003
- Microsoft PowerPoint 2002
- Microsoft PowerPoint 2000
- Microsoft Office Excel 2003
- Microsoft Excel 2002
- Microsoft Excel 2000
- Microsoft Office Access 2003
- Microsoft Access 2002
- Microsoft Access 2000
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- The Microsoft Foundation Classes (MFC)
This article was previously published under Q274680 SUMMARY This article illustrates by example how you can create an
MFC Automation client to retrieve a list of Visual Basic for Automation (VBA)
macros (Sub and Function procedures) from a Microsoft Office document. REFERENCESNotes for Automating Microsoft Office XP Some methods and properties have changed for Microsoft Office XP.
For additional information
about using the sample code described in this article with theMicrosoft Word
2002 type library, click the following article number to view the article in the Microsoft Knowledge Base:
224925
INFO: Type Libraries for Office
May Change with New Release
Office XP applications have a security option to
allow programmatic access to the VBA object model. If this setting is "off"
(the default), you may receive an error running the sample code above.
For additional information
about this setting and how you can correct the error, click the following article number to view the article in the Microsoft Knowledge Base:
282830
PRB: Programmatic Access to Office
XP VBA Project Is Denied
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
266387
How To Find and List Access VBA
Procedures by Using MFC
194906 How To Add
and Run a VBA Macro Using Automation from MFC
Modification Type: | Major | Last Reviewed: | 3/23/2006 |
---|
Keywords: | kbAutomation kbhowto KB274680 |
---|
|