+ Reply to Thread
Results 1 to 7 of 7

Save & Send PDF to Public Desktop

  1. #1
    Registered User
    Join Date
    07-22-2015
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    4

    Save & Send PDF to Public Desktop

    Hello VBA experts!

    I have a questions about a macro I am writing and after several hours of searching through forums without resolution I decided to go ahead and post my question here.

    My goal is to save a series of set print areas to a pdf on the desktop. I was able to get this to work on my own computer, however, the file will be shared with other analysts and needs to be able to save to any users' desktop. I have tried changing the path to "C:\Users\Public\Desktop\Test Report.pdf" but I get runtime error '1004' message. I will paste the code I currently have below, any help will be very much appreciated. Thanks in advance!

    Please Login or Register  to view this content.
    Last edited by tfry300; 07-22-2015 at 11:52 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Save & Send PDF to Public Desktop

    Welcome to the board, tfry.

    You need to create the directory before you can write to it.

    Please take a few minutes to read the forum rules, and then edit your post to add CODE tags.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    07-22-2015
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    4

    Re: Save & Send PDF to Public Desktop

    Thank you for the reply shg! I just edited my post to include those CODE tags... I'm sure this is a really novice question but I'm learning all of this as I go- How do I create a directory?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Save & Send PDF to Public Desktop

    See the MkDir statement. You can only create one level at a time:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-22-2015
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    4

    Re: Save & Send PDF to Public Desktop

    Okay... I tried adding that to my existing code but get a 'Path/File access error. Is there more to it than that?

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,558

    Re: Save & Send PDF to Public Desktop

    Can you try this on different machines?

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-22-2015
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    4

    Re: Save & Send PDF to Public Desktop

    Thank you, jolivanes! I do have different machines I can try this on and I will give this a shot when I get home tonight. I really appreciate the help!

+ 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. block user to send mail to public domain
    By rochakmehta90 in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 09-17-2014, 07:22 PM
  2. Save As Button save to Desktop instead of My Documents
    By accurateone in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-13-2013, 02:21 PM
  3. [SOLVED] save to desktop
    By mike02 in forum Excel General
    Replies: 1
    Last Post: 07-11-2012, 11:43 AM
  4. Save to desktop
    By zerodegreec in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-22-2009, 03:13 AM
  5. save to desktop macro
    By asabti in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-20-2008, 04:30 PM
  6. Save to default desktop
    By Mark in forum Excel General
    Replies: 7
    Last Post: 08-14-2005, 09:05 AM
  7. [SOLVED] Save .xls as .txt In DeskTop
    By Antonyo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2005, 09:05 AM

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