views:

87

answers:

0

Hi all,

The scenario:

I have a VSTO template which is installed to SharePoint.

Now when i create a workbook from SharePoint (by clicking New->My Template) from the List

i run my code on the ThisWorkbook_Startup event. Inside this event i need to get hold of

the list-url which is "calling" the action, as i need the list-name.

In Word i can use the following property:

`Template attachedTemplate = this.AttachedTemplate as Template;

string path = attachedTemplate.Path;`

This will in Word give me the Url.

For Excel however this does not exist and string path = ThisApplication.TemplatesPath; is simply empty.

Does anyone have an idea on how to access this piece of information from within Excel?

Thanks in advance.