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-02T20:48:44+00:00

    Have you tried recording a macro using my steps the assign key combo to activate? If you use best for print, it will create links that can be seen on a printed page but if you were to send through email, they would look active but would not be.

    __________

    Disclaimer:

    The questions, discussions, opinions, replies & answers I create, are solely mine and mine alone and do not reflect upon my position as a Community Moderator.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2018-03-02T20:34:18+00:00

    I should have mentioned that I was not saving the file manually, but rather using a macro to generate the pdf with a one-button-click.  I've now updated my question to be more clear.

    So, while your approach works for manual saving, it does not actually solve my problem. Still, I thank you.

    But, now I'm wondering how to incorporate your suggestion into that 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

    I looked on this page 

    https://msdn.microsoft.com/en-us/vba/word-vba/articles/wdsaveformat-enumeration-word

    and don't see any PDF format available other than the wdFormatPDF

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2018-03-02T19:13:52+00:00

    In Word 365/2016 to create Pdf's in which the Links will remain Active. Do the following:

    1. Create and save your document first in Docx format as a Backup.
    2. Next, go to File → SaveAs → Export.
    3. Click on PDF.

    4. Choose Best for Electronic distribution and accessibility. 5. Then click export.

    The document will be printed as pdf that can be sent by email and links will be active.

    __________

    Disclaimer:

    The questions, discussions, opinions, replies & answers I create, are solely mine and mine alone and do not reflect upon my position as a Community Moderator.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments