Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
B. Levien
 
Posts: n/a
Default Word 2002 - Unhide Grahpic in Header

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.

Brenda Levien.
  #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 :-)

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
B. Levien
 
Posts: n/a
Default Word 2002 - Unhide Grahpic in Header

Are you writing Visual Basic?

Most macros we create are through Tools and Macros, not Visual.

I found that if I pause record, and choose the macro, and then start
recording, the macro runs as I intended.

Thanks.

"Cindy M -WordMVP-" wrote:

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 :-)


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

Hi ?B?Qi4gTGV2aWVu?=,

Are you writing Visual Basic?

Most macros we create are through Tools and Macros, not Visual.

ALL macros you record are written down as Visual Basic for Applications
(VBA). Choose one of your macros in Tools/Macro/Macros, then click
"Edit" and you'll see what I mean :-)

If you want a macro to do something that the macro recorder can't
handle, then you must edit it or, sometimes, write the macro from
scratch.

I found that if I pause record, and choose the macro, and then start
recording, the macro runs as I intended.

If this works for you, that's fine :-)

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 :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word should catalog misspelled words to study. rndthought Microsoft Word Help 39 May 21st 23 02:47 AM
Word should allow to 'divide' page by 3 or 4, not just 2 CandasK Page Layout 2 February 28th 06 10:16 PM
Converting Word Perfect forms to Word forms elyse Microsoft Word Help 1 February 15th 06 08:17 PM
Word 2002 and Word 2003 trading default file association Enochscion Microsoft Word Help 2 May 27th 05 10:19 PM
In Word, how can I see all files (*.*) in "save as"? citizen53 New Users 8 April 4th 05 04:56 PM


All times are GMT +1. The time now is 08:55 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"