
Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
Thanks, I will give this one a shut too but right after I posted this
question I stumble to "FileSystem.CurDir" and I was able to get to the string
of the current drive and directory. But FileSystem.CurDir does not work whey
you use it in the Insert Field INCLUDETEXT on the Header and Footer section.

Signature
Jeff B Paarsa
> > Hello,
> >
[quoted text clipped - 11 lines]
> Application.MacroContainer.FullName gives you the full pathname of the
> template containing the code being run
Jean-Yves - 06 Oct 2006 15:41 GMT
Hi Jeffery,
use CurDir. Paste in VBA , press the F1 key and you will get all info.
Regards
JY
> Thanks, I will give this one a shut too but right after I posted this
> question I stumble to "FileSystem.CurDir" and I was able to get to the
[quoted text clipped - 23 lines]
>> Application.MacroContainer.FullName gives you the full pathname of the
>> template containing the code being run
Cindy M. - 09 Oct 2006 10:11 GMT
Hi =?Utf-8?B?SmVmZmVyeSBCIFBhYXJzYQ==?=,
> I will give this one a shut too but right after I posted this
> question I stumble to "FileSystem.CurDir" and I was able to get to the string
> of the current drive and directory. But FileSystem.CurDir does not work whey
> you use it in the Insert Field INCLUDETEXT on the Header and Footer section.
You have to be careful with CurDir. CurDir might not be the same folder as the
current document, or the template containing the macro.
Jonathan gave you the way to get the path for the template containing the macro.
Nothing in your original message even hints at your wanting to use IncludeText
in the header/footer section. You certainly CANNOT use VBA *in* field codes;
field codes do not support VBA. If the content you're linking into a document
isn't in the same file, or file path, of the current document, then you have to
use the complete file path. The CurDir is irrelevant, because it will always be
the folder which the Word APPLICATION last accessed.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)