Computer Forum Forum Index
Register  FAQ Profile Log in to check your private messages Log in Register 

Macro for that stops a picture from printing

 
Post new topic   Reply to topic    Computer Forum Forum Index -> word vba customization
View previous topic :: View next topic  
Author Message
Martin H
Guest





PostPosted: Tue Oct 09, 2007 1:21 pm    Post subject: Macro for that stops a picture from printing Reply with quote

Hi,

I'm using microsoft word 2003 and I want to set a JPEG in the header and
footer background to show the other people where to type but do not want this
to JPEG to print. I just want it to be in the document as a reference image
as it is to be pre-printed.

I had a reply that a macro is available to be able to do this, if so can
someone forward me in the right direction?

Thanks

Martin
Back to top
Google
Sponsor





PostPosted: Tue Oct 09, 2007 1:21 pm    Post subject: Advertisement

Back to top
Jean-Guy Marcil
Guest





PostPosted: Tue Oct 09, 2007 2:01 pm    Post subject: Re: Macro for that stops a picture from printing Reply with quote

Martin H was telling us:
Martin H nous racontait que :

Quote:
Hi,

I'm using microsoft word 2003 and I want to set a JPEG in the header
and footer background to show the other people where to type but do
not want this to JPEG to print. I just want it to be in the document
as a reference image as it is to be pre-printed.

I had a reply that a macro is available to be able to do this, if so
can someone forward me in the right direction?

Something like this to get you going:

'_______________________________________
Dim rgeHeader As Range
Dim rgeFooter As Range

Set rgeHeader =
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range
Set rgeFooter =
ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Range

With rgeHeader
.ShapeRange.Delete
End With

With rgeFooter
.ShapeRange.Delete
End With

Application.Dialogs(wdDialogFilePrint).Show

ActiveDocument.Undo 2
'_______________________________________

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Computer Forum Forum Index -> word vba customization All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Computer Forum