Hello Dave,
From your post, my understanding on this issue is: you want to know how to
extend a Word COM add-in to Excel and PowerPoint. If I'm off base, please
feel free to let me know.
First, we need to add the registration entries of the add-in for Excel and
PowerPoint:
Right click the addin setup project,
View->Registry_.HKEY_LOCAL_MACHINE.Software.Microsoft.Office, then add the
entries for Excel and PowerPoint.
Secondly, we need to edit the code of the add-in project. Excel and
PowerPoint do not have "documents". Excel has Workbooks and PowerPoint
contains Presentations. If we need to access the contents of different
Office applications, we need to
1. Determine the current application type by using
Type applicationType = applicationObject.GetType();
string appName = (string)applicationType.InvokeMember( "Name",
BindingFlags.GetProperty, null, applicationObject, null);
2. Call Type.InvokeMember on different Office object models
(
http://msdn2.microsoft.com/en-us/library/de3dhzwy.aspx).
For Excel Object Model, please refer to the MSDN articles in
http://msdn2.microsoft.com/en-us/library/aa272254(office.11).aspx
For PowerPoint, see
http://msdn2.microsoft.com/en-us/library/aa213568(office.11).aspx.
Here is an example about how to build a shared add-in for Word and Excel
for your reference
http://msdn2.microsoft.com/en-us/library/aa159658(office.11).aspx
Please let me know if you have any other concerns, or need anything else.
Sincerely,
Jialiang Ge (
[email protected], remove 'online.')
Microsoft Online Community Support
==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document:
http://blogs.msdn.com/msdnts/pages/postingAlias.aspx
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.