Issue saving Excel-file to desktop on any mac

%3CLINGO-SUB%20id%3D%22lingo-sub-1555688%22%20slang%3D%22en-US%22%3EIssue%20saving%20Excel-file%20to%20desktop%20on%20any%20mac%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1555688%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ein%20our%20company%20we%20use%20a%20business%20system%20built%20in%20Excel.%20We%20wish%20to%20save%20files%20automatically%20in%20PDF-format%20to%20the%20desktop%20using%20VBA%2Fmacros.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20code%20in%20my%20macro%20point%20to%20a%20location%20in%20my%20own%20computer%2C%20and%20I%20wish%20that%20the%20macro%20could%20point%20to%20the%20general%20desktop%20when%20Excel%20is%20used%20in%20any%20computer.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20it%20possible%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20managed%20to%20make%20the%20VBA-code%20this%20far%20for%20a%20Mac%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EChDir%20%22%2FUsers%2Fdavidvingren%2FDesktop%2F%22%3C%2FP%3E%3CP%3EActiveSheet.ExportAsFixedFormat%20Type%3A%3DxlTypePDF%2C%20FileName%3A%3D%20_%20%22%2FUsers%2Fdavidvingren%2FDesktop%2F%22%20%26amp%3B%20Range(%22A1%22)%2C%20Quality%3A%3DxlQualityMinimum%2C%20_%20IncludeDocProperties%3A%3DTrue%2C%20IgnorePrintAreas%3A%3DFalse%2C%20OpenAfterPublish%3A%3D%20_%20False%20End%20Sub%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHelp%20very%20much%20appreciated!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1555688%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%20on%20Mac%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1556170%22%20slang%3D%22de-DE%22%3ESubject%3A%20Issue%20saving%20Excel-file%20to%20desktop%20on%20any%20mac%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1556170%22%20slang%3D%22de-DE%22%3E%3CA%20href%3D%22http%3A%2F%2Fwww.rondebruin.nl%2Fmac.htm%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fwww.rondebruin.nl%2Fmac.htm%3C%2FA%3E%20%3CBR%20%2F%3E%20%3CA%20href%3D%22http%3A%2F%2Fwww.rondebruin.nl%2Fmac.htm%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fwww.rondebruin.nl%2Fmac.htm%3C%2FA%3E%20%3CBR%20%2F%3E%20Maybe%20this%20page%20helps%20solve%20your%20problem.%20%3CBR%20%2F%3E%20If%20not%2C%20please%20just%20ignore%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%20%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Happy%20to%20be%20able%20to%20communicate%20with%20you%20%3CBR%20%2F%3E%20Nikolino%20%3CBR%20%2F%3E%20I%20don't%20know%20anything%20(Socrates)%3C%2FLINGO-BODY%3E
Occasional Visitor

Hi,

 

in our company we use a business system built in Excel. We wish to save files automatically in PDF-format to the desktop using VBA/macros.

 

The code in my macro point to a location in my own computer, and I wish that the macro could point to the general desktop when Excel is used in any computer.

 

Is it possible?

 

I have managed to make the VBA-code this far for a Mac:

 

ChDir "/Users/davidvingren/Desktop/"

ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:= _ "/Users/davidvingren/Desktop/" & Range("A1"), Quality:=xlQualityMinimum, _ IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _ False End Sub

 

 

Help very much appreciated!

1 Reply
http://www.rondebruin.nl/mac.htm

Maybe this page helps to solve your problem.
If not, please just ignore

Happy to be able to communicate with you
Nikolino
I know I don't know anything (Socrates)