How do I refer to current directory in a FIELD / INCLUDETEXT

P

Peter Berg

Instead of: { INCLUDETEXT "C:\\D\\F.XML" \t "C:\\D\\F.XSL" }, I would like to
have the files F.XML and F.XSL places in the word document's own directory
(se FILENAME \p).
I have found a complicated method with VBA and Macro's, but do not like it.
I search for something like:
{ INCLUDETEXT "<CURDIR>\\F.XML" \t "<CURDIR>\\F.XSL" },
 
P

Peter Jamieson

You either have to use code, e.g. to set up a DOCPROPERTY or DOCVARIABLE, or
you have to name your files in a way that allows you to use { FILENAME
\p } - I don't know if it works in this case, but it certainly works with
simple inclusions of .docs

e.g. if the containing document is c:\d\a.doc and you can name your other
files c:\d\a.doc.xml and c:\d\a.doc.xsl, then you may be able to use

{ INCLUDETEXT "{ FILENAME \p }.xml" \t "{ FILENAME \p }.xsl" }

Peter Jamieson
 
P

Peter Berg

Thank you for your answer. First, I will not use more time trying to find a
default way of doing it, and second, instead of working on my VBA macro, I
will settle with creating a directory with the same name & "-files", good
enough. So thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top