+ Reply to Thread
Results 1 to 6 of 6

Using footer to display a "document expiration date"

  1. #1
    Scott Wagner
    Guest

    Using footer to display a "document expiration date"

    I have some controlled documents that occasionally need to be printed, some
    of which are in excel, and need to have a date printed on them when the
    printed document should be destroyed. Basically adding a footer that read:

    "This document is invaid after 01/01/2006"

    The date should be 30 days after the date the document is printed.

    How is this done?

    Thanks in advance,

    Scott



  2. #2
    Bob Phillips
    Guest

    Re: Using footer to display a "document expiration date"

    Private Sub Workbook_BeforePrint(Cancel As Boolean)
    With ActiveSheet.PageSetup
    .LeftFooter = "This document is invaid after " & Format(Date + 30,
    "dd/mm/yyyy")
    End With

    End Sub

    'This is workbook event code.
    'To input this code, right click on the Excel icon on the worksheet
    '(or next to the File menu if you maximise your workbooks),
    'select View Code from the menu, and paste the code


    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Scott Wagner" <[email protected]> wrote in message
    news:[email protected]...
    > I have some controlled documents that occasionally need to be printed,

    some
    > of which are in excel, and need to have a date printed on them when the
    > printed document should be destroyed. Basically adding a footer that

    read:
    >
    > "This document is invaid after 01/01/2006"
    >
    > The date should be 30 days after the date the document is printed.
    >
    > How is this done?
    >
    > Thanks in advance,
    >
    > Scott
    >
    >




  3. #3
    Scott Wagner
    Guest

    Re: Using footer to display a "document expiration date"

    Not working... following your directions. What could I be missing here?

    Thanks for the quick response.



    "Bob Phillips" wrote:

    > Private Sub Workbook_BeforePrint(Cancel As Boolean)
    > With ActiveSheet.PageSetup
    > .LeftFooter = "This document is invaid after " & Format(Date + 30,
    > "dd/mm/yyyy")
    > End With
    >
    > End Sub
    >
    > 'This is workbook event code.
    > 'To input this code, right click on the Excel icon on the worksheet
    > '(or next to the File menu if you maximise your workbooks),
    > 'select View Code from the menu, and paste the code
    >
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove nothere from email address if mailing direct)
    >
    > "Scott Wagner" <[email protected]> wrote in message
    > news:[email protected]...
    > > I have some controlled documents that occasionally need to be printed,

    > some
    > > of which are in excel, and need to have a date printed on them when the
    > > printed document should be destroyed. Basically adding a footer that

    > read:
    > >
    > > "This document is invaid after 01/01/2006"
    > >
    > > The date should be 30 days after the date the document is printed.
    > >
    > > How is this done?
    > >
    > > Thanks in advance,
    > >
    > > Scott
    > >
    > >

    >
    >
    >


  4. #4
    Forum Contributor
    Join Date
    11-20-2005
    Posts
    256
    Hi Scott,

    Bob's code is working for me, Are you sure you put it in the "WorkBook" Module,
    and not a General or Sheet Module??

    Dave
    Quote Originally Posted by Scott Wagner
    Not working... following your directions. What could I be missing here?

    Thanks for the quick response.



    "Bob Phillips" wrote:

    > Private Sub Workbook_BeforePrint(Cancel As Boolean)
    > With ActiveSheet.PageSetup
    > .LeftFooter = "This document is invaid after " & Format(Date + 30,
    > "dd/mm/yyyy")
    > End With
    >
    > End Sub
    >
    > 'This is workbook event code.
    > 'To input this code, right click on the Excel icon on the worksheet
    > '(or next to the File menu if you maximise your workbooks),
    > 'select View Code from the menu, and paste the code
    >
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove nothere from email address if mailing direct)
    >
    > "Scott Wagner" <[email protected]> wrote in message
    > news:[email protected]...
    > > I have some controlled documents that occasionally need to be printed,

    > some
    > > of which are in excel, and need to have a date printed on them when the
    > > printed document should be destroyed. Basically adding a footer that

    > read:
    > >
    > > "This document is invaid after 01/01/2006"
    > >
    > > The date should be 30 days after the date the document is printed.
    > >
    > > How is this done?
    > >
    > > Thanks in advance,
    > >
    > > Scott
    > >
    > >

    >
    >
    >
    Thx
    Dave
    "The game is afoot Watson"

  5. #5
    Bob Phillips
    Guest

    Re: Using footer to display a "document expiration date"

    Could it be NG wrap-around.

    Maybe try

    Private Sub Workbook_BeforePrint(Cancel As Boolean)
    With ActiveSheet.PageSetup
    .LeftFooter = "This document is invaid after " & _
    Format(Date + 30,"dd/mm/yyyy")
    End With

    End Sub


    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Scott Wagner" <[email protected]> wrote in message
    news:[email protected]...
    > Not working... following your directions. What could I be missing here?
    >
    > Thanks for the quick response.
    >
    >
    >
    > "Bob Phillips" wrote:
    >
    > > Private Sub Workbook_BeforePrint(Cancel As Boolean)
    > > With ActiveSheet.PageSetup
    > > .LeftFooter = "This document is invaid after " & Format(Date +

    30,
    > > "dd/mm/yyyy")
    > > End With
    > >
    > > End Sub
    > >
    > > 'This is workbook event code.
    > > 'To input this code, right click on the Excel icon on the worksheet
    > > '(or next to the File menu if you maximise your workbooks),
    > > 'select View Code from the menu, and paste the code
    > >
    > >
    > > --
    > > HTH
    > >
    > > Bob Phillips
    > >
    > > (remove nothere from email address if mailing direct)
    > >
    > > "Scott Wagner" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > I have some controlled documents that occasionally need to be printed,

    > > some
    > > > of which are in excel, and need to have a date printed on them when

    the
    > > > printed document should be destroyed. Basically adding a footer that

    > > read:
    > > >
    > > > "This document is invaid after 01/01/2006"
    > > >
    > > > The date should be 30 days after the date the document is printed.
    > > >
    > > > How is this done?
    > > >
    > > > Thanks in advance,
    > > >
    > > > Scott
    > > >
    > > >

    > >
    > >
    > >




  6. #6
    Scott Wagner
    Guest

    Re: Using footer to display a "document expiration date"

    That worked.

    Thanks so much!


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1