INCLUDEPICTURE Field to use %Appdata%?

P

Paul J

I want to use the INCLUDEPICTURE field to insert a graphic into a Word 2003
header but I want the link to use the environment system path variable:
%AppData%.

Can anyone advise me if this is this possible?

I have tried various combinations of upper-and/or-lower case spelling of
"AppData" and some variations in the use of "\\" but all to no avail so far.

I want to use the INCLUDEPICTURE field in order to keep the Word document
file sizes small (and quick) and I want to use the system path variable,
%AppData%, to keep the graphics files secure but available on (only)
authorised users' PCs.

Any advice will be gratefully received.

Paul J
 
C

Cliff

The INCLUDEPICTURE and INCLUDETEXT fields do not support relative paths (at
least correctly.) You should only use absolute paths, e.g. "C:\Documents and
Settings\SomeUser\Desktop\File.ext" Note that doing so with make documents
dependent on the directory structure and break when opened by other users
(without permissions) or when moved.

If you want to have images that refer to the current user's directory, you
could use a VBA macro that runs on document open to create/update the
fields.
 
R

RPJ

Cliff,

Many thanks for your speedy response.

Whilst I am very disappointed that INCLUDEPICTURE and INCLUDETEXT do not
handle %appdata% "correctly", I can see how the use of an autoopen macro
might be able to address this problem of mine.

However, I have two misgivings:

1/ the use of a macro would automatically update the document (fields) when
a user may only want to view the document (users would be invited to "save
the changes" which they were unnaware had happened).

2/ without having tested out your solution, I am concerned that any
re-sizing, postioning and (graphics) grouping information, created as a
result of my initially placing the graphic in the document, will be lost or
corrupted (Lord knows Word 2003 can be a bit peculiar when handling graphics).

Is there a way to get INCLUDEPICTURE to support relative paths "correctly"?

Might there be an alternative way around this problem?

Once again, any help from members of the community will be gratefully
recieved.

Paul J
 
K

Knut Singer

Hi,
Perhaps you could use the subst-command on local drives or the "net use"
command on network shares to work with drive letters.

So you can set the includepictrue path to <driveletter>:\<picturepath>
in all documents.

And on the user pc you set with subst <driveletter>: <localpath> the
path to the pics (or with net use <driveletter>: <share> the path to
the net share).

The subst command could be include in a batch file, started via registry
key "run", the net use commmand also or via netlogon.bat

Ciao, Knut
 
C

Cliff

Paul,
I would try Knut's advice. Your concern #1 is valid regarding macros, and
macros may, depending on a user's security settings, not run at all unless
specifically enabled by the user (e.g. on Word 2007.)

There is, unfortunately, no way to get Word to use relative paths correctly.
This issue has been brought to the Office team's attention, but they have
yet to correct Word's behavior.

--Cliff
 

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