Steve Faleiro
Posts: 15
Joined: 2024-09-12
|
Using: Delphi 10.2.3 Tokyo, Add-In Express Professional 10.1.1705, MS-Office Professional 2021
I am developing an add-in for Outlook and need it to show the task pane only in the Appointment window, either when creating a new appointment or when editing an existing appointment. How can I do this?
I've created the add-in using the wizard, and added a task pane from there.
Then on the add-in module (AddInModule) designer, for the TaskPanes property, which opens up a list window with the task pane in the list, I selected the task pane and in the properties window I set these properties to False:
olExplorers := False
olInspectors := False
Then I added these events for the add-in module: How to show the task pane from these events, only for Appointment windows?
procedure TAddInModule.adxCOMAddInModuleOLInspectorActivate(Sender: TObject);
begin
//
end;
procedure TAddInModule.adxCOMAddInModuleOLNewInspector(ASender: TObject; const Inspector: _Inspector);
begin
//
end;
I'm not sure if any of the above steps is wrong or not. I searched the documentation and forums but could not find any information on how to achieve what I want. Please help!
Thanks in advance. |
|
Andrei Smolin
Add-in Express team
Posts: 19095
Joined: 2006-05-11
|
Hello Steve,
You should hide the form in the TadxOlForm.ADXBeforeFormShow event: check the item of the inspector in which the form is going to show up and decide whether to hide the form or let it go.
Regards from Poland (GMT+2),
Andrei Smolin
Add-in Express Team Leader |
|
Steve Faleiro
Posts: 15
Joined: 2024-09-12
|
Hi Andrei
You should hide the form in the TadxOlForm.ADXBeforeFormShow event: check the item of the inspector in which the form is going to show up and decide whether to hide the form or let it go.
TaskPaneClass does not have ADXBeforeFormShow event. I need to show the task pane only on Appointment windows (New or Edit). How can I do that? Please provide some sample code.
For the AddInModule.TaskPanes[0], which is the task pane in question, I have the property OutlookWindows.olInspectors set to True, so it shows on all Outlook (inspector) windows. |
|
Andrei Smolin
Add-in Express team
Posts: 19095
Joined: 2006-05-11
|
Hello Steve,
Sorry for my mistake; I've misread your message.
Set TaskPane.Visible := false; this would be the default value. Also, connect to the NewInspector event to check whether the item being opened is an Appointment, and if so, set TaskPane.Visible := true, otherwise set TaskPane.Visible := false.
To show the task pane for the Explorer window, use the ExplorerFolderSwitch event.
Regards from Poland (GMT+2),
Andrei Smolin
Add-in Express Team Leader |
|