I'm using some script to export data to Excel that starts like this:
' Prepare MS Excel for work
Set xlApp = CreateObject("Excel.Application")
Set xlWB = xlApp.Workbooks.Add("C:\Program Files\Microsoft Office\Templates\template1.xlt")
Now that works fine providing the template is in the specified location, but I'm finding problems in that some people don't keep their templates in this directory and I'm thinking it might be better to put the template in the same directory as their Notes files. Normally this will be C:\Notes\Data\ probably, but again people can choose something else. So I'm wondering, if I place the template in whatever directory the user is using for storing his database, then can we alter the code above to look in the same directory as the database is located whatever it is, without actually specifying the path as done above?