Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Tue, 9 Oct 2007 06:21:02 -0700,    group: microsoft.public.word.vba.customization        back       


Macro for that stops a picture from printing   
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
date: Tue, 9 Oct 2007 06:21:02 -0700   author:   Martin H

Re: Macro for that stops a picture from printing   
Martin H was telling us:
Martin H nous racontait que :

> 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
date: Tue, 9 Oct 2007 10:01:16 -0400   author:   Jean-Guy Marcil DontEvenTry@NoSpam

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us