dwergkees was telling us:
dwergkees nous racontait que :
>> What if you change
>> logo.Visible = msoFalse
[quoted text clipped - 7 lines]
> walking through the code doesn't help, as it always work when the vba
> window is open :(
Well, I am not sure what to write at this point. The code you posted seemed
OK.
(
Except maybe that
Set headerLogo =
Application.ActiveDocument.Sections.Item(1).Headers.Item(wdHeaderFooterPrimary).Shapes("LogoHeader")
was a little "overkill," this would have worked as well:
Set headerLogo =
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Shapes("LogoHeader")
)
So I am not sure I can help, except if you do not mind me looking at your
document. Un-mangled my email address in my signature if you want me to take
a quick look at it.

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
dwergkees - 20 Apr 2006 20:42 GMT
> Well, I am not sure what to write at this point. The code you posted seemed
> OK.
Yeah, that's my problem, it all * seems * OK, it's beginning to look
like a vba/word bug by now :)
Anyway, i mailed you a document containing both code and images (real
app has code in normal.dot) wich reproduces the exact problem. Just
press File > Print, then Cancel and then repeat the procedure. the
first time the images won't hide (but the msgboxes appear), the second
time the images will hide. (at least on the two pc's i tested on).
TIA!
Wilco Menge (aka Dwergkees)
Jean-Guy Marcil - 20 Apr 2006 21:06 GMT
dwergkees was telling us:
dwergkees nous racontait que :
>> Well, I am not sure what to write at this point. The code you posted
>> seemed OK.
[quoted text clipped - 11 lines]
>
> Wilco Menge (aka Dwergkees)
Sorry, but...
Here is what I did:
1. I open the document you sent and saw the 2 logos
2. I hit CTRL-P
3. Right away I noticed the 2 logos become invisible
4. The print dialog appeared
5. I hit Cancel
6. The logos became visible again
7. The 2 message boxes appeared
Then, as you mentioned when you wrote to me directly, just in case, I
transferred the code to Normal.dot and tried again.
Same result.
So... what is going on at your end of things?
One thing I forgot to ask from the get go... What Office version are you
using?
That might make a difference.
I tested your document on Office 2003 SP2.

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
dwergkees - 21 Apr 2006 22:48 GMT
at your side it works as expected, so it seems to be my setup. my
setup: winXP sp2, office 2003 sp2 (the same as yours it seems)
the thing that goes wrong at my end is point 3. the logo's wont go
invisible. when i repeat the steps it does. seems to me like some sort
of bug, i am not going to track anymore but blame it on ms instead :)
thanks for looking into it!
dwergkees