View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M -WordMVP-
 
Posts: n/a
Default Word 2002 - Unhide Grahpic in Header

Hi ?B?Qi4gTGV2aWVu?=,

I need to write a macro which will open a header, file the hidden graphic,
and make the graphic visible.

Does anyone know how to do this? I can open the Header and Footer, but when
I do a find for the graphic, it does not find anything.

You can address a graphic in a specified range directly, without having to Find
it. Since you can hide it, I'm assuming it's not been formatted with any text
wrap. This would make it an InlineShape (as opposed to a Shape). So something
along these lines:

Dim doc as Word.document
Dim rng as Word.Range
Dim ils as Word.InlineShape

Set doc = ActiveDocument
Set rng = doc.Sections(1).Headers(wdHeaderFooterPrimary).Ran ge
rng.InlineShapes(1).Range.Font.Hidden = false

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)