Add date to existing output of pdf file
Results 1 to 4 of 4

Thread: Add date to existing output of pdf file

  1. #1
    Board Regular
    Join Date
    Nov 2010
    Posts
    2,328
    Post Thanks / Like
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Default Add date to existing output of pdf file

    Hi,

    Here is the partial piece of code that is working & in use.
    Code:
    strFileName = "C:\Users\Ian\Desktop\REMOTES ETC\DR COPY INVOICES\" & Range("N4").Value & ".pdf"
    The file above once saved would be like 146.pdf

    Now to expand a little there is a date i cell N13

    Can you advise what the new line of code would be which would also include the date so it would be like

    146_14/07/2019.pdf

    Many thanks
    I have learning difficulties so please be patient if i'm slow on the uptake,Thanks Very Much...

  2. #2
    Board Regular
    Join Date
    Oct 2007
    Posts
    5,807
    Post Thanks / Like
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Default Re: Add date to existing output of pdf file

    '/' is invalid in file names, so you could have this:
    Code:
        strFileName = "C:\Users\Ian\Desktop\REMOTES ETC\DR COPY INVOICES\" & Range("N4").Value & Format(Date, "_dd-mm-yyyy") & ".pdf"

  3. #3
    Board Regular
    Join Date
    Nov 2010
    Posts
    2,328
    Post Thanks / Like
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Add date to existing output of pdf file

    Thanks I will tray that in the morning.
    Can you advise a macro which can change all the other 145 files to match the same format other than me manually doing them one by one.

  4. #4
    Board Regular
    Join Date
    Nov 2010
    Posts
    2,328
    Post Thanks / Like
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Add date to existing output of pdf file

    Works well thanks
    I have learning difficulties so please be patient if i'm slow on the uptake,Thanks Very Much...

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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