Include picture from file based on data entered in form

D

danthedane

I want to print a document including data entered in a form. Amongst these
data there is a 'Geographical Identity Code (GIC)' . I want the entered code
to cause the inclusion of a specific .gif file with a name equal to the
GIC-code. Fyi the graphic shows a small geographical map. I assume that a
link to a graphics file shall be used, but how can I make the link variabel
based on the forms-data?
 
M

macropod

Hi dan,

If you use a formfield, you can solicit the GIC code with that. Then, if you
set the formfield's properties to 'calculate on exit' and give it a
meaningful bookmark name (eg GIC), an INCLUDEPICTURE field like the
following will pull the picture in:
{INCLUDEPICTURE "C:\\My Documents\\{GIC}.gif"}
where:
.. you replace 'C:\\My Documents\\' with the path to your file, using
double-backslashes as path separators;
.. the field braces '{}' are created via Ctrl-F9;
.. the 'GIC in {GIC} is your meaningful bookmark name; and
.. the document is protected for forms after setting this up.

One side-effect of this is that your document will have the GIC code
appearing in the formfield, but carefully placing that near the image might
be a bonus.

Cheers
 
Top