PP 2007/2010 compatibility

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

PP 2007/2010 compatibility

Post by Robie »

This may be a stupid question but googling has got my brain in a twist. Please confirm my understanding on this.

PP2003: All macros as in an add (.ppa), loaded by a presentation (once) & then available for use by the users of that particular template (.pot). The .ppa will create toolbars/buttons etc.

PP2007: Now, this is confusing. From what I understand is that we *don't* need an addin since macros are stored in the template (.potm). These can then be accessed by the user of that template when creating a presentations (pptx). We can add a *tab* and store our macros there (for access by the users). If we do need an addin in PP2007/2010 then what is the point of .potm file? Oh, it is all so confusing. :hairout:

PP2010: Same as PP2007.

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PP 2007/2010 compatibility

Post by HansV »

Macros in a PowerPoint add-in (.ppa in PowerPoint 2003 or earlier, .ppam in PowerPoint 2007 or later) are available in ALL presentations, not just presentations based on a specific template (.pot, .potx or .potm).
Also, an add-in can run code automatically when it is opened or closed.
Best wishes,
Hans

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: PP 2007/2010 compatibility

Post by Robie »

HansV wrote:Macros in a PowerPoint add-in (.ppa in PowerPoint 2003 or earlier, .ppam in PowerPoint 2007 or later) are available in ALL presentations, not just presentations based on a specific template (.pot, .potx or .potm).
Also, an add-in can run code automatically when it is opened or closed.
Interesting. So does that mean if I have all my macros in a specific .potm file then it is loaded whenever a presentation is created using that template in PP2007/2010 (i.e. same as Word)? Otherwise, I don't see a purpose of the .potm file.

In my case, the macros available to the user (actually it's only two) are for presentations based on a particular template (for PP 2007/2010). All other presentations created with different templates have no need for them. In fact, my macros check if the template of the presentation is a specific template before going ahead with the process otherwise nothing happens when the user clicks the button. This is only for 2003 yet.

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PP 2007/2010 compatibility

Post by HansV »

When you create a new presentation based on a template (.pot, .potx or .potm), PowerPoint simple loads a copy of the template into memory and names it Presentation1 or similar. If the template contains macros, the new copy will contain those macros too. So when you open the presentation later on, PowerPoint doesn't have to load the template - all macros are contained in the presentation itself.

This is the same as the behavior of Excel, but different from that of Word, where macros are kept in the template, not copied into documents based on the template.
Best wishes,
Hans

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: PP 2007/2010 compatibility

Post by Robie »

HansV wrote:When you create a new presentation based on a template (.pot, .potx or .potm), PowerPoint simple loads a copy of the template into memory and names it Presentation1 or similar. If the template contains macros, the new copy will contain those macros too. So when you open the presentation later on, PowerPoint doesn't have to load the template - all macros are contained in the presentation itself.

This is the same as the behavior of Excel, but different from that of Word, where macros are kept in the template, not copied into documents based on the template.
Ok, now it is beginning to make sense. But, is it wise/safe to have macros in ppt or pptx file? What is the "normal" for presentations to have or not to have macros in the ppt/pptx files? From my point of view, it would certainly be easier to have the macros in ppt/pptx files so that I don't need to worry about addins, etc. I could provide a button or two in a specific toolbar to access my macros within the potm file.

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PP 2007/2010 compatibility

Post by HansV »

An add-in is used for macros that should be available in all (or at least in many) presentations; an add-in is also a convenient way to make macros available to users within an organization.

Macros that are specific to a presentation should be kept within that presentation.

And if you need to show the presentation elsewhere or need to send it to someone outside your organization, it's more convenient to store macros in the presentation itself, otherwise you'd have to include the add-in with it. The add-in would have to be installed on the target computer, which might not always be possible.
Best wishes,
Hans

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: PP 2007/2010 compatibility

Post by Robie »

HansV wrote:An add-in is used for macros that should be available in all (or at least in many) presentations; an add-in is also a convenient way to make macros available to users within an organization.

Macros that are specific to a presentation should be kept within that presentation.

And if you need to show the presentation elsewhere or need to send it to someone outside your organization, it's more convenient to store macros in the presentation itself, otherwise you'd have to include the add-in with it. The add-in would have to be installed on the target computer, which might not always be possible.
Thanks for your response Hans. Hopefully, last question before the weekend.

I created a .potm file (PP2007) with macros and also added to them to a specific tab. I made sure all the security settings are off (just for testing purposes). Now, when create a presentation with it, it gives me the new tab and the two macros I have defined. But, when I click them it tell me 'The macro cannot be found or disabled by your security settings'!. It doens't make sense. If I go into View tab and select the macros from it then it runs successfully. Doesn't make sense.

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PP 2007/2010 compatibility

Post by HansV »

Try saving the presentation in a trusted location.
Best wishes,
Hans

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: PP 2007/2010 compatibility

Post by Robie »

HansV wrote:Try saving the presentation in a trusted location.
It already is in the trusted location. It seems that the macros within the tab (created in potm) refer to the macro in the .potm file. I thought they would access the macros in the pptm file, i.e. local macros! All files, potm, pptm, pptx, are in trusted location (for testing purposes).

Basically, what I would like to do is provide access to the macros in a pptm file within a tab (created in the potm file) and therefore not worry about the addins. But, it seems I can't do that - the macros are accessible is by the View menu, Macros tab :-(. So, it seems if/when user takes the presentation offsite, the user will not be able to access the macros.

So, is there any way of providing a quick access to the macros within a pptm file via a tab? The only way I see is for it to be created with a ppa/ppam file. Why oh why do they make it so complicated :sad: :scratch: :hairout: .
Last edited by Robie on 13 Mar 2011, 11:45, edited 1 time in total.

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PP 2007/2010 compatibility

Post by HansV »

What tool are you using to add a tab to the ribbon? PowerPoint 2007 doesn't have this capability built in as far as I know.
Best wishes,
Hans

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: PP 2007/2010 compatibility

Post by Robie »

HansV wrote:What tool are you using to add a tab to the ribbon? PowerPoint 2007 doesn't have this capability built in as far as I know.
Apologies Hans. It is apparently PP2010 on my PC - I thought I was using 2007. Tech services updated it without my knowledge and I didn't realise it had changed (stupid of me).

Anyway, I have now restored 2007. This time I am adding the same macro as part of the Quick Access Toolbar (QAT) within the .potm file. I thought this would be reflected in the presentation created with the potm and give me access to that macro but it fails with 'The macros can not be found or have been disabled because of your security settings'. Everything is enabled that can be enabled. Of course, I can access that same macro thru the View tab | Macros ... & it runs fine.
macro access.png
macro access 2.png
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PP 2007/2010 compatibility

Post by HansV »

What happens if you save Presentation1 in a trusted location? And the template?
Best wishes,
Hans

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: PP 2007/2010 compatibility

Post by Robie »

HansV wrote:What happens if you save Presentation1 in a trusted location? And the template?
Thay are both in trusted location and in fact, same folder.

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PP 2007/2010 compatibility

Post by HansV »

In your screenshot it looked like Presentation1 hadn't been saved yet.
But I'm afraid I don't have a solution for you. Sorry!
Best wishes,
Hans

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: PP 2007/2010 compatibility

Post by Robie »

HansV wrote:In your screenshot it looked like Presentation1 hadn't been saved yet.
But I'm afraid I don't have a solution for you. Sorry!
Thanks for trying Hans. We will get there someday - hopefully, we may skip 2007 and move to 2010 (not that it will solve all our problems).