+ Reply to Thread
Results 1 to 6 of 6

Read out Filename and Save all Sheet as Filename.pdf

  1. #1
    Registered User
    Join Date
    05-16-2014
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    78

    Read out Filename and Save all Sheet as Filename.pdf

    hi,

    i need your help for a little Problem.
    I want to put in a Button which save the the Excelfile [all sheets] as Filename.pdf

    It is no problem to record a macro. But if i export the macro. The filename is not not the filename from the actually sheet.

    Please Login or Register  to view this content.
    But how have i to change the macro that the current filename is in the row: "C:\Users\????\Desktop\TEST-Marco-Ordner\20140524_Test.pdf"

  2. #2
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: Read out Filename and Save all Sheet as Filename.pdf

    Hi
    Try this code and add the macro to a buton on your Worksheet

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Good luck.
    Tony

  3. #3
    Registered User
    Join Date
    05-16-2014
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    78

    Re: Read out Filename and Save all Sheet as Filename.pdf

    Hi Tony,

    Is it possible to read out the path of the open file and save it there as. pdf????

    "C:\????\.pdf"

  4. #4
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: Read out Filename and Save all Sheet as Filename.pdf

    Hi
    Try this code:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Good luck.
    Tony
    Last edited by ARGK; 05-27-2014 at 10:51 AM.

  5. #5
    Registered User
    Join Date
    05-16-2014
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    78

    Re: Read out Filename and Save all Sheet as Filename.pdf

    hi Tony

    doesn' t work.

    Runtime error, Dokument not saved

    If i Use this. It save the macro, but as "& aWkb & .pdf" in the Document Library. Not with the filename in the File from the Excelsheet
    Please Login or Register  to view this content.
    Last edited by bluesurger; 05-27-2014 at 11:23 AM.

  6. #6
    Registered User
    Join Date
    05-16-2014
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    78

    Re: Read out Filename and Save all Sheet as Filename.pdf

    hy ARGK.

    i got it, the Code is:
    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. Replies: 2
    Last Post: 08-13-2012, 05:20 PM
  2. Replies: 3
    Last Post: 07-09-2012, 03:09 PM
  3. macro to save sheet from workbook. Specified location and filename
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-14-2011, 11:47 PM
  4. Replies: 1
    Last Post: 05-14-2006, 06:10 PM
  5. [SOLVED] hyperlink to sheet in formula, can't save under new filename
    By Franky in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-21-2006, 11:25 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