Re: How to start a custom VBA macro from the ribbon in Powerpoint2
- From: "\"Ji Zhou [MSFT]\"" <v-jzho@xxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 27 Sep 2008 14:04:39 +0800
Hello Martin,
I am glad to hear that the issue is resolved. Thus I am going to close this thread at this time. If you have any other questions or concerns, please do not hesitate to let me know. I am more than happy if I can provide any future help! Thanks again for using the Microsoft Newsgroup Service!
Have a nice weekend!
Best regards,
Ji Zhou (v-jzho@xxxxxxxxxxxxxxxxxxxx, remove ‘online.’)
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg@xxxxxxxxxxxxxx
This posting is provided "AS IS" with no warranties, and confers no rights.
"martin-v" <martin-v@xxxxxxxxxxxxxxxx> wrote in message news:DD031D87-CA1F-4A26-AB29-AB4CCE214D88@xxxxxxxxxxxxxxxx
Hello Ji Zhou,
now I see what the problem was.
I did all the steps you described - and it worked.
They were the same I did before - with one slight difference: I had saved
the File as .potm (instead of .pptm).
But: when I opened the (working) .pptm, saved it as .potm and doubleclicked
the .potm to create a new presentation based on it I got the same behaviour
as before.
The code is visible in the editor, but when I press F5 (or Alt-F8 in the
presentation) the list of macros is empty.
Now I tried to save this new presentation and I got the clue: It tried to
save as .pptx-File. As soon as I saved it as .pptm-File, closed and reopened
it the macros worked!
Thank you, you made my day lots nicer ;)
Martin
--
2B||!2B?
"""Ji Zhou [MSFT]""" wrote:
Good morning Martin! Thanks for using Microsoft Newsgroup Support Service,
my name is Ji Zhou [MSFT] and I will be working on this issue with you.
I use the same ribbon xml file and VBA routine as yours, but I cannot
reproduce this issue on my side. When I press the new created button on the
ribbon, the PowerPoint will always find and call my VBA routine correctly.
The following is what I have done on my side. If my steps have any
difference from yours, please let me know.
1.Firstly, I downloaded a ribbon customization tool "Custom UI Editor Tool"
from this link
http://openxmldeveloper.org/archive/2006/05/26/CustomUIeditor.aspx
2.I opened the PowerPoint application. A blank PowerPoint file was created
by default and I saved it as .pptm file(Macro Enabled PowerPoint) into the
D:\
3.I started the tool "Custom UI Editor Tool", used it to open the .pptm
file created in step 2, and pasted your ribbon xml string into the editor.
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="false">
<tabs>
<tab id="customTab" label="Menu-Macros">
<group id="CreateMenu" label="Create Menu">
<button id="MenuBuild" label="Create a Menu"
imageMso="SlideMasterTextPlaceholderInsert" size="large"
onAction="modMenue.CreateMenuRibbon" screentip="Create a
menu"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
I clicked the Save button in the tool's command bar. This automatically
added the folder and XML file to the document container and created the
relationship for us.
4.I opened the .pptm file in PowerPoint application, and pressed Alt+F11 to
show up the VBA IDE. Afterwards, I created a module named modMenue and
inputted the following VBA routine codes into that module.
Sub CreateMenuRibbon(control As IRibbonControl)
MsgBox "test"
End Sub
5.I saved the .pptm file and navigated the ribbon to Tab "Menu-Macros",
clicked "Create a Menu" button. A message box with "test" string popped up.
Would you like to try my steps on your side to see if it works? And I have
also attached the PowerPoint file I created in this post for your testing.
If the problem still exists, could you please provide your created
powerpoint file to me for a troubleshooting purpose. You can access me by
the following email, v-jzho@xxxxxxxxxxxxxx
Have a nice day!
Best regards,
Ji Zhou (v-jzho@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights
.
- References:
- How to start a custom VBA macro from the ribbon in Powerpoint2007?
- From: martin-v
- RE: How to start a custom VBA macro from the ribbon in Powerpoint2007?
- From: "\"Ji Zhou [MSFT]\""
- RE: How to start a custom VBA macro from the ribbon in Powerpoint2
- From: martin-v
- How to start a custom VBA macro from the ribbon in Powerpoint2007?
- Prev by Date: Re: Call Function in Access VBA.
- Next by Date: Close PPT Presentation programatically at end of last slide
- Previous by thread: RE: How to start a custom VBA macro from the ribbon in Powerpoint2
- Next by thread: RE: How to start a custom VBA macro from the ribbon in Powerpoint2007?
- Index(es):
Relevant Pages
|