• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Print PDF using VBA on Mac without specifying path

nicoleoneaus

New Member
Hey guys,
I'm trying to make a macro that can save a pdf from an active sheet to the desktop without me specifying the user. Is this possible? I'm asking as the file is going to be used by multiple people and I'll have to replicate the macro 10 times. So to avoid changing the code 100 times to specify the user, is there a way to avoid any access issues by not mentioning the user and somehow getting the document saved on desktop?

I'm also reading a lot that there is a difference or more difficulty doing it as a Mac user.

Kind Regards,
Nico
 
nicoleoneaus
You should send a sample Excel-file.
... but here is one part:
... there is a difference ... as a Mac user.
Code:
path_to_desktop_with_Mac = "/Users/" & MacScript("set userName to short user name of (system info)" & vbNewLine & "return userName") & "/Desktop"
 
Back
Top