PDA

View Full Version : Loaded Add-in's path and name in its AutoExec



gandhikumar
02-17-2012, 07:56 PM
Hi all,

I have some trouble in MS Word VBA's AutoExec subroutine. My problem
is - how to get the location and name of the add-in global template file
when I add it to any word document. The add-in global template has AutoExec subroutine(macro). And I want to know the location in that macro.

I used VBE.ActiveVBProject.FileName in AutoExec but it gives some
other project name. I suspect that AutoExec runs before its ActiveCodePane
is set in VBE.

Please, help me sharpen my VBA knowledge.

Paul_Hossler
02-18-2012, 08:01 AM
I think it'd be better to repost this in the Word Forum. not Announcements.

Also include the version of MS Word

Paul

gandhikumar
02-19-2012, 07:54 PM
Thank you for your guidance, Sir.

D.Gandhi Kumar