Works like a champ!! Thanks for the wonderful advice.
Main Topics
Browse All TopicsI have a document where I fill out some cells, use a form button to run a macro that calculates the rest of the data, and need to print it to a PDF printer (not my default), and also to a specified folder as a specified name as part of the form button macro. I tried recording it to see how far I could get, but to no avail.
Here's my code so far:
Application.ActivePrinter = "Adobe PDF on Ne03:"
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,""Ad
Is there a way I can specify the file location somewhere between all the commas, otherwise, what do I need to do to get this to work. I'm not familiar with what the "ExecuteExcel4Macro" function is, or what the spaces between the commas indicate either.
A side note: My filename and file location are set to variables already.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: byundtPosted on 2009-11-06 at 19:30:38ID: 25764855
Excel version 4 had a macro language that still survives as a vestigial appendage today. You can execute a command from that macro language in VBA using the ExecuteExcel4Macro statement. You can get help on the macro language here http://www.microsoft.com/d ownloads/d etails.asp x? FamilyID =C09BF7F7- D30E-4CE9- 8930-5D037 48CA5CD&di splaylang= en "Excel 2000 Help File: Running Excel 4.0 Macros"
That said, I use Excel4 macros only when there is no other way to do something. With Excel 2007, you have the ability to export as a pdf file. See the snippet, which sets the destination file name.
Brad
Select allOpen in new window