+ Reply to Thread
Results 1 to 6 of 6

Save to specific location as cell name

  1. #1
    Registered User
    Join Date
    03-16-2009
    Location
    SN3 4TN
    MS-Off Ver
    Office 2007/2003
    Posts
    7

    Save to specific location as cell name

    Hi all,

    I've been searching for ages trying to work out how to do this but have so far only managed to confuse myself.
    I have office 2007 and I have found some code to convert an excel sheet to PDF, however I need it to saveas the contents of cell (e6) and save to a location on our network drives (C:\TEMP\).

    Please Login or Register  to view this content.
    Your help will be most appreciated.
    Last edited by Jabba; 10-15-2009 at 06:06 AM. Reason: SOLVED

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016
    Posts
    3,273

    Re: Save to specific location as cell name

    Hi,

    Try this:

    Please Login or Register  to view this content.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    03-16-2009
    Location
    SN3 4TN
    MS-Off Ver
    Office 2007/2003
    Posts
    7

    Re: Save to specific location as cell name

    Thanks Dave, that worked perfectly.

  4. #4
    Registered User
    Join Date
    06-19-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    2

    Macro to Save File as PDF based on Cell Contents

    Sub pdfsave()

    pdfname = Range("P4").Value

    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=pdfname, Quality:=xlQualityStandard, _
    IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
    True
    End Sub

  5. #5
    Registered User
    Join Date
    06-19-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    2

    Macro to Save File as PDF based on Cell Content to specific folder

    I am looking for a macro to saved to a specific folder on my computer as a PDF file (c:\My Documents/PDF) and automatically named based on cell content. Excel 2007

    This coding below works, but I want to add that it automatically saves to a specific folder on my computer.

    Is it possible to save to PDF and .xls in the same macro?

    Sub pdfsave()

    pdfname = Range("P4").Value

    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=pdfname, Quality:=xlQualityStandard, _
    IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
    True
    End Sub

  6. #6
    Registered User
    Join Date
    02-14-2014
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Macro to Save File as PDF based on Cell Content to specific folder

    Sub Button_click()
    '
    ' Button_click Macro
    '

    '
    ChDir "c:\My Documents"
    ActiveWorkbook.SaveAs Filename:=Range("A1").Value, FileFormat:= _
    xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
    ChDir "c:\My Documents"
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Range("A1").Value, _
    Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
    :=False, OpenAfterPublish:=True
    End Sub
    Last edited by richard brown; 04-02-2014 at 06:31 AM.

+ 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