Outlook COM add-in

D

donald

Hi there,

If i got a command that i am calling from a form (item) is there a way
of know what item it has been call from so that I don't have to pass
the item with the command every time??

Public Function createshortcut(ByVal t As Outlook.JournalItem)

to

Public Function createshortcut()

Thanks a Lot

Jonathan
 
K

Ken Slovak - [MVP - Outlook]

Is this VBScript form code? If so Item is global to the form code and
returns the Item object for that form.
 
K

Ken Slovak - [MVP - Outlook]

ActiveInspector might be useful for you then. If the focus is on that item
then ActiveInspector.CurrentItem would return the item in that Inspector.
 
D

donald

thanks Ken for that that works but what happen if the Item is not a
ActiveInspector.CurrentItem??? i know it will not work but is that the
only way of doing this??
 
K

Ken Slovak - [MVP - Outlook]

If the Inspector you want doesn't have focus it won't be the
ActiveInspector. You could iterate the entire Inspectors collection or you
could just handle the NewInspector event and track every Inspector and its
CurrentItem as the new Inspector is opened.
 

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