+ Reply to Thread
Results 1 to 4 of 4

Looking for a macro to save excel file as pdf and change hyperlinks to work in pdf format

  1. #1
    Registered User
    Join Date
    01-18-2013
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    11

    Looking for a macro to save excel file as pdf and change hyperlinks to work in pdf format

    Hi everyone,

    I am looking for a macro that will enable me to do the following:

    1) Change the hyperlinks (functions) in a certain column to non-function hyperlinks (so that they will be clickable in pdf)
    2) Hide certain columns
    3) And finally save as a pdf file in a certain file folder location in my drive

    Just to be clear (because my computer lingo is pretty bad) in step 1: I have a huge amount of hyperlink formulas/functions that open the corresponding file when clicked. These hyperlinks will work in excel, but I have found that they will NOT work when converted to pdf.
    Therefore I am trying to convert all of these at once (with a macro) into hyperlinks that will still link to the same location but will work when saved as a pdf.

    Please let me know if I am not being clear enough and please try to help me someone !

    Thanks a lot :]

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,386

    Re: Looking for a macro to save excel file as pdf and change hyperlinks to work in pdf for

    You can get the basic code for 2) and 3) by recording a macro as you carry out the task. Step 3) is just a Save As .pdf file with a fully qualified path and file name.

    Step 1) should be just a case of recording a macro while you select the column, copy it, and then paste special | values over the original so that you just have the URL.

    If you want/need further assistance from me, or anyone on the forum, I suggest that you post a sample workbook with some typical, non-sensitive data.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    01-18-2013
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Looking for a macro to save excel file as pdf and change hyperlinks to work in pdf for

    Thank you very much for the reply Mr. Shuttleworth and yessss - you are totally right about attaching a sample (non-sensitive) workbook.
    I have edited what I am looking for and reposted my problem to this address: http://www.excelforum.com/excel-prog...df-format.html

    - I didn't know how to attach a file onto a thread that has already been created so I just made a new one. I have also slightly updated what I am looking for in content area of the post.

    I wanted to let you know that I am absolutely terrible with excel macro code. I am pretty good with formulas but macros are something that are quite foreign to me. I was wondering if you would be able to help me record the macro and create the code for this to work (in the sample workbook).

    Please take a look at the link I have provided above! Good day sir.

  4. #4
    Registered User
    Join Date
    01-18-2013
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Looking for a macro to save excel file as pdf and change hyperlinks to work in pdf for

    Oh and also - As you said here: "Step 1) should be just a case of recording a macro while you select the column, copy it, and then paste special | values over the original so that you just have the URL."

    I am pretty sure that will not work..as the hyperlinks will just be pasted over by what is being returned in the cell visually so if the hyperlink is masked by "C14" it will be pasted over by a static "C14" that is simply a text value and lacking the hyperlink portion. I could be wrong however.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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