+ Reply to Thread
Results 1 to 11 of 11

Macro for Save as Pdf in 1 page

  1. #1
    Registered User
    Join Date
    08-13-2014
    Location
    Istanbul
    MS-Off Ver
    2013
    Posts
    59

    Macro for Save as Pdf in 1 page

    I need a macro which will save the selected area in 1 page by asking if vertical or horizantal.

    (It would be great if it also asks where to save and if it saves it with the name of the page with the time.

    Thanks in advance..

  2. #2
    Registered User
    Join Date
    08-13-2014
    Location
    Istanbul
    MS-Off Ver
    2013
    Posts
    59

    Re: Macro for Save as Pdf in 1 page

    Can anyone help?

  3. #3
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Re: Macro for Save as Pdf in 1 page

    Hi, First change red line (Folder name) then try it...
    Dont forget to select selected area before running macro...
    Please Login or Register  to view this content.
    Last edited by HerryMarkowitz; 04-20-2015 at 11:11 AM.
    Sub DontForgetThese()
         If Your thread includes any code Then Please use code tags...
         If Your thread has been solved Then Please mark as solved...
         If Anybody has helped to you Then Please add reputation...
    End Sub

  4. #4
    Registered User
    Join Date
    08-13-2014
    Location
    Istanbul
    MS-Off Ver
    2013
    Posts
    59

    Re: Macro for Save as Pdf in 1 page

    Hi HerryMarkowitz, thank you for your response.

    There is a problem I faced up; I select the area but it detects half of it and save it as PDF in half.

    On the other hand, I am writing C:\Users\Win8\Desktop\ but it can be different if I use it in different computer and I need to change the macro every time. Can it show the list and asks me to select where to save?

    ( Teşekkürler )
    Last edited by akinkaraman; 04-20-2015 at 11:17 PM.

  5. #5
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Re: Macro for Save as Pdf in 1 page

    Quote Originally Posted by akinkaraman View Post
    On the other hand, I am writing C:\Users\Win8\Desktop\ but it can be different if I use it in different computer and I need to change the macro every time. Can it show the list and asks me to select where to save?
    Change this line;
    Please Login or Register  to view this content.
    With this;
    Please Login or Register  to view this content.

    I dont understand about that;
    Quote Originally Posted by akinkaraman View Post
    I select the area but it detects half of it and save it as PDF in half.

  6. #6
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: Macro for Save as Pdf in 1 page

    Hi akinkaraman
    Here are 2 solutions for you. Print As PDF-1 will prompt you for a name to save the pdf file as, then prompt
    again for the page orientation you want to use & save the activesheet selection on your desktop as a PDF.
    Print As PDF-2 will prompt for the page orientation & open the save dialogue for you to choose your own destination
    folder & filename, then save it as a PDF.
    You can put buttons on any worksheet to call the macros


    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-13-2014
    Location
    Istanbul
    MS-Off Ver
    2013
    Posts
    59

    Re: Macro for Save as Pdf in 1 page

    Hello HerryMarkowitz, the first file I attached is with your codes which is half view, Second one is with Philb1's codes.

    Mr. Philb1's code is not giving the file name with workbook name with date and time. I entered manually and it doesn't open the pdf automaicly after creating.

    Mr. HerryMarkowitz's code is exactly like what I wanted after I modified the file name but it gives the view in half.

    (Not: HerryMarkowitz selam dostum. Oluşturulan pdf sectiğim alanın yarısını gösteriyor. 1. dosyaya bir bakar mısın, sizin kodu kullandım. 2. dosya diğer arkadaşın kodlarıyla ama manuel adlandırdım. Görüşmek üzere.. Akın)
    Attached Files Attached Files

  8. #8
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Re: Macro for Save as Pdf in 1 page

    Try.............
    Please Login or Register  to view this content.
    Last edited by HerryMarkowitz; 04-21-2015 at 09:31 AM.

  9. #9
    Registered User
    Join Date
    08-13-2014
    Location
    Istanbul
    MS-Off Ver
    2013
    Posts
    59

    Re: Macro for Save as Pdf in 1 page

    Mükemmel

  10. #10
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Re: Macro for Save as Pdf in 1 page

    Is it solved or not?

  11. #11
    Registered User
    Join Date
    08-13-2014
    Location
    Istanbul
    MS-Off Ver
    2013
    Posts
    59

    Re: Macro for Save as Pdf in 1 page

    Solved.. Thank you..

+ 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. Stop macro from moving to front page on save
    By EuEra in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-15-2014, 02:03 AM
  2. Macro to open web page and save as .xls
    By manmo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2012, 04:17 AM
  3. Pausing Macro to save sheet as web page
    By windme in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-17-2010, 04:12 PM
  4. Macro to open URL then save page as a text file
    By jasocke2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2009, 10:06 AM
  5. [SOLVED] Save Excel book as Html Page Using Macro
    By Excel in forum Excel General
    Replies: 3
    Last Post: 02-21-2006, 10:10 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