how to get _Global interface pointer?

J

Jerry Nettleton

In a C++ COM add-in for Word, how can I get the _Global interface pointer?
The OnConnection event gives me the _Application and COMAddIn interfaces. I
tried to use the Parent property to find the _Global interface but no luck
yet.

What is the _Application->Creator (long) property used for?

Jerry
 
P

Peter Huang [MSFT]

Hi

I think the Global Object is used in the VBA IDE for easier reference. All
its properties and method can be found under the application object.

Global Object
Global
Multiple objects


Contains top-level properties and methods that don't need to be preceded by
the Application property. For example, the following two statements have
the same result.

Documents(1).Content.Bold = True
Application.Documents(1).Content.Bold = True



Here is the document for the Creator Property
============================================================================
======================

Creator Property
See AlsoApplies ToExampleSpecificsReturns a 32-bit integer that indicates
the application in which the specified object was created. For example, if
the object was created in Microsoft Word, this property returns the
hexadecimal number 4D535744, which represents the string "MSWD." This value
can also be represented by the constant wdCreatorCode. Read-only Long.

expression.Creator
expression Required. An expression that returns one of the objects in
the Applies To list.

Remarks
The Creator property was primarily designed to be used on the Macintosh,
where each application has a four-character creator code. For example,
Microsoft Word has the creator code MSWD. For additional information about
this property, consult the language reference Help included with Microsoft
Office Macintosh Edition.

Example
This example displays a message about the creator of myObject.

Set myObject = ActiveDocument
If myObject.Creator = wdCreatorCode Then
MsgBox "This is a Microsoft Word object"
Else
MsgBox "This is not a Microsoft Word object"
End If



Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top