Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2007

Tip: Looking for answers? Try searching our database.

Macro for that stops a picture from printing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Martin H - 09 Oct 2007 14:21 GMT
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
Jean-Guy Marcil - 09 Oct 2007 15:01 GMT
Martin H was telling us:
Martin H nous racontait que :

> Hi,
>
[quoted text clipped - 5 lines]
> 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
'_______________________________________

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.