You could remove entries in the CFBundleDocumentTypes array in Info.plist files. To apply the changes, run /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -f -R /Applications/
and reopen Finder.
Modifying an Info.plist breaks the code signature of signed applications and makes some applications like TextEdit crash on launch.
Here is the solution for Word 2013. It involves only adding a Visual Basic macro to Word and few records to the registry.
Create a global macro in Word 2013: open any document in Word, open the built-in Visual Basic editor (Alt + F11), select Normal in the left panel, click Insert in the main menu, then Module, and copy the code into the editor:
Sub ExportToPDFext()
ChangeFileOpenDirectory ThisDocument.Path
ActiveDocument.ExportAsFixedFormat _
OutputFileName:=Left(ActiveDocument.FullName, InStrRev(ActiveDocument.FullName, ".")) + "pdf", _
ExportFormat:=wdExportFormatPDF, _
OpenAfterExport:=False, _
OptimizeFor:=wdExportOptimizeForPrint, _
Range:=wdExportAllDocument, _
From:=1, _
To:=1, _
Item:=wdExportDocumentContent, _
IncludeDocProps:=True, _
KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, _
DocStructureTags:=True, _
BitmapMissingFonts:=True, _
UseISO19005_1:=False
Application.Quit SaveChanges:=wdDoNotSaveChanges
End Sub
Save the module (Ctrl + S) and close Visual Basic editor and Word.
Then add the context menu options to registry. Create and execute a file with the extension .reg
:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Word.Document.8\shell\SavePDFhere]
@="Save PDF here"
[HKEY_CLASSES_ROOT\Word.Document.8\shell\SavePDFhere\command]
@="\"C:\\Program Files\\Microsoft Office\\Office15\\WINWORD.EXE\" /mExportToPDFext /q \"%1\""
[HKEY_CLASSES_ROOT\Word.Document.12\shell\SavePDFhere]
@="Save PDF here"
[HKEY_CLASSES_ROOT\Word.Document.12\shell\SavePDFhere\command]
@="\"C:\\Program Files\\Microsoft Office\\Office15\\WINWORD.EXE\" /mExportToPDFext /q \"%1\""
The right-click "Save PDF here" will appear in Explorer for DOC and DOCX files.
It works silently and supports batch conversion of several selected documents.
Best Answer
Are you referring to the "Open With" sub menu?
If so, the contents are controlled by LaunchServices and you may need to rebuild your Launch Services database or you could state that you can handle .pdf files with a UTI in your Info.plist.
To rebuild the Launch Services Database:
Using 10.4:
Using 10.5/10.6 the location changed to CoreServices.framework:
Adding the UTI information is something best asked at Stack Overflow however.