How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Michael Hannigan Your Own Question
Michael Hannigan
Michael Hannigan, Mac Support Specialist
Category: Mac
Satisfied Customers: 11697
Experience:  25+ Years Experience in Computers and Electronics.
Type Your Mac Question Here...
Michael Hannigan is online now
A new question is answered every 9 seconds

I am looking to help me create a simple macros in Microsoft

Customer Question

I am looking for someone to help me create a simple macros in Microsoft Word for Mac 2016 that will save the current file as a PDF in the same location and with the same filename prefix as the document open. I have tried using one that was built for Word
2010 (Windows version) but it does not work on my current version.
Submitted: 1 year ago.
Category: Mac
Customer: replied 1 year ago.
I have come across this one that appears to be working:Sub SaveActiveDocAsPDF()On Error Resume NextActiveDocument.SaveAs _
fileName:=ActiveDocument.FullName & ".pdf", _
End SubHowever, when it saves the file it saves as: filename.docx.pdf
I want it to save as filename.pdfCan someone help me edit this?
Customer: replied 1 year ago.
Ok I found out how to do it. But there is still a problem.The macro works PERFECTLY in Word for Mac 2011.It does not work in Word for Mac 2016 in the following way:
It creates the PDF file, however in 2016 it does not save it in the same directory as where the word document is found, whereas in 2011 it does just fine.In 2016, it's placing the file in Library>Containers>>Data>DocumentsHow do I fix this? Thanks
Expert:  Michael Hannigan replied 1 year ago.

Hello. My name is***** can help you with your question.

The first thing I would do on the one that appears to be working is to take out the on error resume next. The reason is that this will cause the script just to skip any errors and continue without tell you where the errors are. So will make it appear that there is no error but it doesn't actually do anything to fix the error.


Related Mac Questions