Differentiate between office products

P

poolguard

i am creating an application that is available in outlook 2002, word 2002,
and excel 2002. my question is how can i tell what application i am in. i
use the connect.vb with the code below but the applicationObject is just a
System.__ComObject. I hope that makes sense.

Thanks


Dim applicationObject As Object

Public Sub OnDisconnection(ByVal RemoveMode As
Extensibility.ext_DisconnectMode, ByRef custom As System.Array) Implements
Extensibility.IDTExtensibility2.OnDisconnection
On Error Resume Next
If RemoveMode <>
Extensibility.ext_DisconnectMode.ext_dm_HostShutdown Then _
Call OnBeginShutdown(custom)

applicationObject = Nothing
End Sub


Private Sub MyButton_Click(ByVal Ctrl As
Microsoft.Office.Core.CommandBarButton, ByRef CancelDefault As Boolean)
Handles MyButton.Click
If MainForm Is Nothing Then
MainForm = New frmLauncher(applicationObject)
End If
MainForm.Show()
End Sub
 
C

Cindy M.

Hi =?Utf-8?B?cG9vbGd1YXJk?=,

Try querying the .NAME property of the applicationObject
i am creating an application that is available in outlook 2002, word 2002,
and excel 2002. my question is how can i tell what application i am in. i
use the connect.vb with the code below but the applicationObject is just a
System.__ComObject. I hope that makes sense.

Thanks


Dim applicationObject As Object

Public Sub OnDisconnection(ByVal RemoveMode As
Extensibility.ext_DisconnectMode, ByRef custom As System.Array) Implements
Extensibility.IDTExtensibility2.OnDisconnection
On Error Resume Next
If RemoveMode <>
Extensibility.ext_DisconnectMode.ext_dm_HostShutdown Then _
Call OnBeginShutdown(custom)

applicationObject = Nothing
End Sub

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
C

Cindy M.

I will file that under the stupid question cat.<G> I'm told there's no such thing. Happens to all of us. I
chalk it up to "can't see the forest for the trees". We get
so wrapped up in a tangle of things that we can't see the
"obvious".

That's why groups like this are so important. Someone not
as close to a problem will have a fresh perspective :)

Good luck on your project!

Cindy Meister
 

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