BookmarkSubscribeRSS Feed
Victor
Calcite | Level 5
Hello


1) I need to know within the custom task wich application is calling it : Excel, Word, etc. Is it possible ? I tried this :

_consumer.Option(EnvironmentOption.HostApplicationName)

But it is not enough. I can only know if it is Guide or an Add-In.

2) Is it possible to call Add-In dialog boxes within the custom task? like "Server Connexion", "Open a data table", "Stored Process List", etc.

3) Is it possible to communicate with the calling application (Excel, word) ? As same as VBA objects for example : Application, Workbooks, ActiveWoorkBook ?

4) Add-In's and Guide's Server Configuration are very different. Is there a project to make them the same? In guide, you can simply change the server by choosing it in a list box. In Add-in, you have to go into the configuration form to change the server.


Regards
1 REPLY 1
ChrisHemedinger
Community Manager
Victor,

Some answers:

1. You can use .NET calls to determine the application. For example, you can use System.Diagnostics.Process.GetCurrentProcess() to gather information about the current running process, including the EXE name.

2. You can indirectly call the file dialog to select a data set with the ISASTaskConsumer2.ShowDataSelector method.

3. We don't provide a direct hook into the Office object models, but you might be able to gain access by using the GetCurrentProcess() approach as outlined in (1).

4. Yes, in the 4.2 releases of EG and Office Add-In, these mechanisms have converged to be the same.

Chris
SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 879 views
  • 0 likes
  • 2 in conversation