PowerPoint won't link -- running Monterey 12.3 on MacBook Pro with M1 chip

Lately Hook is unable to link to my PowerPoint presentations. Hook 3.4 is properly authorized and works as it should in all cases that I have tried, with the exception of PowerPoint.

I have just switched to the Apple M1 chip computer and now run Monterey 12.3. Might this have any bearing? I use PowerPoint 16 for Mac.

I can create a link with Hook if I work from Finder — just highlight the file in Finder and then Hook it. Is the the only way to work with ppt presentations?

Do you have OneDrive enabled? Please compare:
Using Hook in Microsoft OneDrive with Microsoft Office Apps – Hook

I do not have OneDrive enabled. Also, the message Hook returns is a bit different than the one in the example in the discussion you referred me to. It is:


I have very few occasions when I want to Hook to a PowerPoint presentation so for now going through Finder is quite fine.

Thanks for your response.

I’ve test on a M1 with macOS 12.3.1 (latest for M1) using several powerpoint files, and it works for me.

Could you please check Hook > Preferences> Scripts Tab > Microsoft Powerpoint ? If there is a * next to the name of the app, that means it’s been overridden.

then please cick on the Get Address tab there. Do you see this?

tell application "Microsoft PowerPoint"
        set activeDoc to active presentation
        set activeDocName to name of activeDoc
        set activeDocPath to path of activeDoc
        set fullURL to full name of activeDoc
        if fullURL does not start with "http" then
                return "file://" & POSIX path of fullURL
        end if
end tell
set appURL to "ms-powerpoint:ofe|u|" & fullURL

If not perhaps the ~/Library/Application\ Support/com.cogsciapps.hook/DefaultAppAppleScript.plist is corrupted it. If so you can quit Hook, delete that file, and then relaunch Hook.

Sorry, I cannot find the Scripts Tab. This is what I see when I open Hook preferences;

Script editing requires Hook Pro. I would recommend:

  1. quit Hook app for a moment
  2. delete ~/Library/Application\ Support/com.cogsciapps.hook/DefaultAppAppleScript.plist.
  3. relaunch Hook.
1 Like

I will do what you recommend. How much does it cost to upgrade from Essentials to Pro?

I did what you recommended and now it works (Hook connects directly to Ppt presentations.

Thanks!

1 Like

I am having the same problem. The suggested solution (quit Hook app for a moment, delete ~/Library/Application\ Support/com.cogsciapps.hook/DefaultAppAppleScript.plist., relaunch Hook.
) fixed the problem only temporarily. After closing the PPT and reopening it, the same problem occurred again. Any suggestions? My system: Monterey 12.3 (21E230)

Thanks for reporting, @Morheene . Not clear to me at this point why the file would be corrupted. If you have a Pro license, could you please copy/paste the Powerpoint integration script here (or whatever app you’re having problems with): Scripts Tab – Hook. This is to verify whether it the file is in fact corrupted. That would tell us what we need to do.

Thanks for the swift reply. Here it is:

tell applicause scripting additions
use framework “Foundation”
property NSURL : a reference to current application’s NSURL

tell application “Microsoft PowerPoint”
set n to full name of active presentation
set fp to POSIX path of n
set rawUrl to NSURL’s fileURLWithPath:fp
set f to rawUrl’s absoluteString
return f as string
end telltion “Microsoft PowerPoint” to get “file://” & full name of active presentation

After reading the latest messages I tried again to link to a PowerPoint presentation and for me (like Morheene) the problem again occurs.

Is this the script you are asking about?tell applicause scripting additions
use framework “Foundation”
property NSURL : a reference to current application’s NSURL

tell application “Microsoft PowerPoint”
set n to full name of active presentation
set fp to POSIX path of n
set rawUrl to NSURL’s fileURLWithPath:fp
set f to rawUrl’s absoluteString
return f as string
end telltion “Microsoft PowerPoint” to get “file://” & full name of active presentation

got it there’s a problem in there.

Here’s the fix, to be pasted in Hook’s Script Editor preferences > Powerpoint > Get Address field

use scripting additions
use framework "Foundation"
property NSURL : a reference to current application's NSURL

tell application "Microsoft PowerPoint"
	set n to full name of active presentation
	set fp to POSIX path of n
	set rawUrl to NSURL's fileURLWithPath:fp
	set f to rawUrl's absoluteString
	return f as string
	
end tell
1 Like

Works like a charm! Thanks!

1 Like

Hook’s integration server has been updated. Version 211 has the fix. Sorry all: this was a copy/paste error. Missed it in testing due to having previously overridden my version of that script. We need to make the script-override symbol [currently *] more salient (particularly for long bundle names).