+ Reply to Thread
Results 1 to 10 of 10

Copy Huperlink content to a destination folder in excel

  1. #1
    Registered User
    Join Date
    01-05-2014
    Location
    Saudi Arabia
    MS-Off Ver
    Excel 2003
    Posts
    7

    Copy Huperlink content to a destination folder in excel

    Hi there,
    I want to move some selected .PDF files from 1 folder to another. My spreadsheet contain approx. 20000 records in which each cell is linked to a .pdf file. I have attached a sample of the spreadsheet. Here in we can see that in Column C and H has got hyperlinks which points to a .PDF file. It will be really grateful if anybody can help me write code for this on a button click. Thank you.
    BMT
    Attached Files Attached Files

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Copy Huperlink content to a destination folder in excel

    Hi there,

    It seems that folder paths you're currently using are:

    \\192.168.100.4\AMH-Doc-Server\C-Latest\cDS

    and

    \\192.168.100.4\AMH-Doc-Server\C-Latest\Shop Drawings\X000\Z\OUT to DAR\PDF


    What are the new folder paths which you wish to use?

    Regards,

    Greg M

  3. #3
    Registered User
    Join Date
    01-05-2014
    Location
    Saudi Arabia
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Copy Huperlink content to a destination folder in excel

    Hi Greg,
    wish to copy to my d drive (D:\Drawings).
    Sorry for the late response. Was out of town.

    Thanks ,
    BMatz

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Copy Huperlink content to a destination folder in excel

    Hi again,

    Take a look at the attached workbook and see if it does what you need.

    Clicking on the "Update Hyperlinks" button will change the destinations of all hyperlinks in Columns C and H.

    The destination of the hyperlink in cell C3 will be D:\Drawings\Z-CDS-0094.pdf

    The destination of the hyperlink in cell H3 will be D:\Drawings\X000\Z\OUTtoDAR\PDF\433-X000-Z-00-04-X-0002-00.pdf

    The updating is performed by the following routine:


    Please Login or Register  to view this content.

    You can edit the highlighted values to suit your requirements.

    I hope that I've understood your requirements correctly and that you find the attached workbook useful - please let me know how you get on with it.

    Regards,

    Greg M
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-05-2014
    Location
    Saudi Arabia
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Copy Huperlink content to a destination folder in excel

    Hi Grey,
    thanks for the reply. But what I wanted is to copy the selected files itself (FILECOPY) to the new destination folder. Not changing the destination path alone. Please let me know if you could find a way out for that.

    thanks & regards,
    Bmatz

  6. #6
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Copy Huperlink content to a destination folder in excel

    Hi again Bmatz,

    Thanks for your last post.

    Two questions:

    (1) Your original post said that you wanted to MOVE files, but your last post says you want to COPY them - either option is possible, but can you confirm which one you want?


    (2) Do you want to create exactly the same directory structure on your hard drive as you currently have on the server? I.e. for the files on Row 3, do you want to change the filepaths from

    \\192.168.100.4\AMH-Doc-Server\C-Latest\cDS\Z-CDS-0094.pdf

    to

    D:\Drawings\C-Latest\cDS\Z-CDS-0094.pdf


    and from

    \\192.168.100.4\AMH-Doc-Server\C-Latest\Shop Drawings\X000\Z\OUT to DAR\PDF\433-X000-Z-00-04-X-0002-00.pdf

    to

    D:\Drawings\C-Latest\Shop Drawings\X000\Z\OUT to DAR\PDF\433-X000-Z-00-04-X-0002-00.pdf

    or do you want to drop some of the sub-sub-subfolders? If you can let me have the "from - to" information I'll see what I can do.

    Regards,

    Greg M

  7. #7
    Registered User
    Join Date
    01-05-2014
    Location
    Saudi Arabia
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Copy Huperlink content to a destination folder in excel

    Hi Greg,

    1) what I meant is copy. sorry for the confusion.
    the real scenario is like I have around 50000 pdf files in the server. if a team member tells me to get the latest of some particular category files I select it manually from the server. so I wanted a routine written in excel so I just select from the list and it gets copied to a particular folder in my D drive.

    2) I do not want to create the same folder structure on my drive. the selected files can be copied to a single folder like D:\Drawings

    Thanks & Regards,
    Bmatz

  8. #8
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Copy Hyperlink content to a destination folder in excel

    Hi again Bmatz,

    Take a look at the attached workbook and see if it does what you need.

    If you select any non-blank cell in Columns C or H the "Copy Files To Hard Drive" button will be enabled.

    Clicking on this button will copy the files listed in Columns C and H from their current locations to the "D:\Drawings" folder.

    If more than one cell in Columns C or H is selected, the copy operation will be performed on the files listed on each of the selected rows.

    Hope this helps - please let me know how you get on with it.

    Regards,

    Greg M
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-05-2014
    Location
    Saudi Arabia
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Copy Huperlink content to a destination folder in excel

    Hi Greg,
    That works perfect. Thanks a ton. You saved a lot of time in my daily routine work.

    Regards,
    BMatz

  10. #10
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Copy Huperlink content to a destination folder in excel

    Hi again Bmatz,

    Many thanks for your very prompt feedback - I'm delighted that I was able to help out

    Best regards,

    Greg M

+ 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. Replies: 0
    Last Post: 09-16-2013, 02:24 AM
  2. When i Copy Folder to new destination i lose customised folder icon/picture
    By sternboy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-29-2012, 09:30 PM
  3. name existing on the destination folder
    By LeFootie in forum Excel General
    Replies: 3
    Last Post: 07-05-2012, 11:09 AM
  4. Code for Opening/Saving Hyperlink Content within Excel to a Specific Destination
    By dpickl00 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-26-2011, 11:10 AM
  5. [SOLVED] Copy hyperlink content (.pdf) to a destination folder
    By McQuinge in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-23-2010, 09:12 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