Word for Mac link problem when saving PDF using Macro

Anonymous
2018-03-02T17:07:39+00:00

Please note: this question is regarding a problem in Word for Mac 2016, and NOT Word for Windows. I only refer to the Windows version to provide a contrast and demonstrate the problem. Thanks.

I'm experience problems with links not working when Word for Mac 2016 documents are saved as pdf using the following macro:

Sub SaveActiveDocAsPDF()

On Error Resume Next

Dim saveName As String

Application.DisplayAlerts = False

saveName = ActiveDocument.FullName

saveName = Left(saveName, Len(saveName) - 5) & ".pdf"

ActiveDocument.SaveAs FileName:=saveName, _

FileFormat:=wdFormatPDF

Application.DisplayAlerts = True

End Sub 

To demonstrate I've provided the following Word documents saved at this OneDrive folder:

https://1drv.ms/f/s!AiuBf\_pQqHG\_gpFIcWDjzPvoHsYf6Q

example Word for Mac version 16.10.docx

example Word for Mac version 16.10.pdf

example using Word for Windows 2016  version 1708.docx

example using Word for Windows 2016  version 1708.pdf

When the macro is run using the Mac version the link is not active, but when it is run using the Windows version, the link is active. If you test the files above, the link within does not work in the Mac version pdf, but does work in the Windows version pdf.

I'm using a Macbook Pro with updated OS and updated Office 365 Home software on both Mac and Windows versions.

Thanks,

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Newest
  1. Anonymous
    2018-03-06T06:57:29+00:00

    What I wrote was "I did try using the .SaveAs2 method, but it made no difference." In other words, I was trying to implement the suggested solution and it did not make any difference in terms of my problem.  That is, if one modifies the macro I originally presented so that ".SaveAs" is replaced with ".SaveAs2" there is no difference regarding the problem I'm having.

    I'm not sure how to clarify the problem I'm having better than I did in the original post: "I'm experience problems with links not working when Word for Mac 2016 documents are saved as pdf using the following macro:"

    Then, in my post on March 5, I respond to others who had suggested that I focus on  the option buttons presented during a manual save. In one sense, that suggestion does not address my original question, which has to do with macros rather than manual saves. But on the other hand, I am saying that I've learned that the option choice one makes during the manual save affects subsequent behavior of the macro.

    Then, in that same post, I express puzzlement over this whole situation.  I mean, I just want a macro that will save a document as pdf with one click and have the links still work. But no matter what I do, I can't achieve that.  Instead, what I can achieve is a macro which will result in that desired behavior only if I have chosen the "best for electronic..." option the last time I did a manual save. If I ever choose the "best for printing option" my macro will then cease desired behavior the next time it is run.

    Hope that helps clarify.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2018-03-06T06:46:24+00:00

    I don't understand your question.

    The code using a SaveAs2 method works. Now you are pointing to an option on the Save As dialog that is not invoked by the code we have been discussing...

    So, please clarify what problem you are experiencing.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2018-03-06T03:25:17+00:00

    I did try using the .SaveAs2 method, but it made no difference.

    This discussion has helped me become very clear that if the document is saved as PDF with "Best for Printing", then the links will not work. 

    Furthermore, I have discovered that on Word for Mac the .SaveAs method in a macro will save the document with whatever option was chosen on the last manual save; ie, "Best for Printing" in which links don't work, or "best for electronic distribution" in which links do work. 

    What is puzzling to me is, why must it be this way? Why can't the Word for Windows and Word for Mac folks do something as basic as this in the same way?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  5. Anonymous
    2018-03-02T21:01:30+00:00

    Yes, I did.  Nothing is recorded when I use the macro recorder. Well, I shouldn't say "nothing", here is what I see in the editor after the recording.

    Sub pdfSave()

    '

    ' pdfSave Macro

    '

    '

    End Sub

    Was this answer helpful?

    0 comments No comments