I have a macro which I use to toggle certain graphics on or off. I have
inserted the relevant piece of code below. The problem is that all my
documents have mushroomed to 800+ kb in size from 40kb previously.

My question is it possible to link to a graphic based in a permanent
location rather than the graphic residing in each document? If not, is it
possible to insert the file and delete it instead of toglling visible/hidden?
I would need the graphic to be a precise size and at a precise location.

Thanks.

The current code is:

With ActiveDocument
' Check current status - it's in fax format if graphics are visible
boolFax =
.Sections(1).Headers(wdHeaderFooterFirstPage).Shapes(1).Visible

' Show/Hide the graphics
With .Sections(1)
For Each aShape In .Headers(wdHeaderFooterFirstPage).Shapes
aShape.Visible = Not boolFax
Next aShape
End With

RE: Link to external graphic file or insert/delete graphic by zkid

zkid
Thu Dec 06 19:21:01 PST 2007

Have you tried using the INCLUDEPICTURE field code? You can control its size
by placing it inside a text box, and it is basically a hyperlink to the
original graphic.

"Deejay" wrote:

> I have a macro which I use to toggle certain graphics on or off. I have
> inserted the relevant piece of code below. The problem is that all my
> documents have mushroomed to 800+ kb in size from 40kb previously.
>
> My question is it possible to link to a graphic based in a permanent
> location rather than the graphic residing in each document? If not, is it
> possible to insert the file and delete it instead of toglling visible/hidden?
> I would need the graphic to be a precise size and at a precise location.
>
> Thanks.
>
> The current code is:
>
> With ActiveDocument
> ' Check current status - it's in fax format if graphics are visible
> boolFax =
> .Sections(1).Headers(wdHeaderFooterFirstPage).Shapes(1).Visible
>
> ' Show/Hide the graphics
> With .Sections(1)
> For Each aShape In .Headers(wdHeaderFooterFirstPage).Shapes
> aShape.Visible = Not boolFax
> Next aShape
> End With