+ Reply to Thread
Results 1 to 9 of 9

PDF to PDF using VBA, the purpose is to change the name of PDF

  1. #1
    Registered User
    Join Date
    10-09-2017
    Location
    IDN
    MS-Off Ver
    2007 & 2010 & 2013
    Posts
    48

    PDF to PDF using VBA, the purpose is to change the name of PDF

    Hy all

    i have this code

    Please Login or Register  to view this content.
    this is to convert word to pdf

    what i want to ask is, can it modify convert PDF to PDF?
    the purpose is to change the file name for many file in instant

    or maybe any other quick way?

    thanks in advance

    i attached some sample
    Attached Files Attached Files
    Last edited by adekinteristi; 01-04-2018 at 11:01 PM.

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: PDF to PDF using VBA, the purpose is to change the name of PDF

    You don't use code anything like that to rename a file. Try:
    Please Login or Register  to view this content.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Registered User
    Join Date
    10-09-2017
    Location
    IDN
    MS-Off Ver
    2007 & 2010 & 2013
    Posts
    48

    Re: PDF to PDF using VBA, the purpose is to change the name of PDF

    that's work
    thanks, but the original file is gone too?

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: PDF to PDF using VBA, the purpose is to change the name of PDF

    What exactly are you trying to achieve ?
    Do you want to rename the converted files in column E (pdf-files) ?
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Registered User
    Join Date
    10-09-2017
    Location
    IDN
    MS-Off Ver
    2007 & 2010 & 2013
    Posts
    48

    Re: PDF to PDF using VBA, the purpose is to change the name of PDF

    if possible, the new name in the diffrent folder and still have the old pdf file

  6. #6
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: PDF to PDF using VBA, the purpose is to change the name of PDF

    Quote Originally Posted by adekinteristi View Post
    the original file is gone too?
    Well, you did say:
    the purpose is to change the file name
    Last edited by macropod; 01-04-2018 at 10:56 PM.

  7. #7
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: PDF to PDF using VBA, the purpose is to change the name of PDF

    If you want to make a copy of the file, change:
    If Dir(OldName, vbNormal) <> "" Then Name OldName As NewName
    to:
    If Dir(OldName, vbNormal) <> "" Then FileCopy OldName, NewName

  8. #8
    Registered User
    Join Date
    10-09-2017
    Location
    IDN
    MS-Off Ver
    2007 & 2010 & 2013
    Posts
    48

    Re: PDF to PDF using VBA, the purpose is to change the name of PDF

    well then, sorry that's my fault
    thank you so much

  9. #9
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: PDF to PDF using VBA, the purpose is to change the name of PDF

    Put new filenames (including new path)in column F.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. For those who still need a purpose in life
    By MrShorty in forum The Water Cooler
    Replies: 7
    Last Post: 10-24-2014, 12:17 PM
  2. Introduce myself and purpose here
    By starryjazz in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 05-01-2014, 04:40 AM
  3. What is the purpose of the .lst file
    By mkinsella in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-20-2009, 07:53 AM
  4. What is the purpose of IF
    By excel_beginner in forum Excel General
    Replies: 3
    Last Post: 09-18-2006, 06:49 PM
  5. explain purpose of {}
    By cereldine in forum Excel General
    Replies: 1
    Last Post: 04-04-2006, 08:10 AM
  6. What is the purpose for a Spreadsheet?
    By Trainboy85 in forum Excel General
    Replies: 4
    Last Post: 02-25-2005, 11:06 AM
  7. Purpose of the Microsoft MVP
    By ExcelMonkey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-19-2005, 08:06 AM

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