VBA PPT Event triggered when chart is added - vba

I am trying to write an VBA-Code that triggers whenever a chart is added in PPT. So far I found
this list: Link. However the options don't work, I thought maybe using "AfterShapeSizeChange", since it comes kind of close. But even this event does not work/trigger.
Anybody has an idea what I could use?
Kind regards

Related

How do I disable the change events

Currently I have several worksheets and plenty of values that are input or equal something. However with so many worksheets "talking" to each other, this appears to be causing issues. this occurs directly when a field is changed or button is pushed as I expect it to...
but it also happens indirectly when i'm capturing the data and writing it back to the userform with something like Form.textbox.value = range("A1") triggering the change event for the textbox.
Can someone comment if this is a code structure issue? Is there a best practice for what pieces of code should be separated?
I tried the application.enableevents = False but this does not seem to work with the user form the way i would expect. I found the link below and it seems to describe my issue to a tee but I'm not understanding what they mean by putting a public value in the "userform's module" the rest of disabling it and reenabling it makes sense
Link:
http://www.cpearson.com/excel/SuppressChangeInForms.htm
Can someone dumb this down for me or give a better option? Is this common?
Thanks,
Code after adding the public variable
Module where the information causes change event to trigger

VBA to show/hide data in Word

I am writing a huge procedural manual and would love to be able to hide/show sections as needed. I found the correct way to do it, through bookmarks, check boxes and VBA but am unable to get all three to come together.
These are the instructions I am using:
Link to Instruction Sets
They seem simple enough but I am unable to "view code" by right clicking on the checkbox. Is this a necessary step to add the code or can I just open a new macro and insert the code there?
Other ideas to achieve hiding/showing sections with bookmarks are welcome, too. Thank you!

Using querySaveDocument to additional information

We are trying to save some additional information with a document using the QuerySaveDocument event. However it seems that it is not being triggered at all.
<xp:executeScript script="#{javascript:setField(document1, 'cCustAddr1_fi', 'test');}">
</xp:executeScript>
This is our basic script. All the setField() method does is use replaceItemValue to try and set the field. However it seems that QuerySaveDocument is not even being triggered since we can write pretty much anything and the document will still save without problem, even if it would be impossible to execute.
We have also tried using a simple document1.getDocument().replaceItemValue() script, but again I dont think it even attempts to execute. Our documents save perfectly fine too,
Do you see any reason for this, are we doing our saving wrong, or should we be attaching data onto the document in another way?
Thanks.
Your other question on Unplugged (Using other dialog controls in iOS) suggests that you are using the Unplugged Mobile Controls project.
If that is correct then my comment above applies - the querySaveDocument event won't get fired . You can look at the code in UnpSaveDocument.xsp and possibly add your own SSJS code to that.
Alternatively, if you want an additional item created on your back-end Notes document then you should just be able to add a hidden field to the UnpFormEditor that is bound to the document1 data source and using the relevant item name you want.

VBA Macro changing macro

Is it possible to create a macro in MS Office (in this case Word) that will change other macro code? I was trying to find information but no results.
I have a doc which works as a template. Content of template is changed and then saved to another file. However it is important to have current date in it. It cannot be self-updated. Those docs go to folder of people and it is important to know when they get the document, so it must be simply data (or something that does not update).
I was thinking about an on-start event macro that would input current date and on exit it would ask "Do you want self-update functionality" Yes / No
If Yes, delete that event. However I have no idea if it is possible. If it is I still don't know how to search for it.
No this is not possible. In VBA, unlike some lower level languages when you define an event you can not disable it, even using other VBA code.
In C# or VB.NET, Java or C++ you can disable an event by un-wiring it from the handler, but this is not possible in VBA.
Maybe if you be more clear on what you need I can give you a better answer.

How to create a PowerPoint timer?

I have to complete a timer in PowerPoint, it counts down for a specificed amount of time when a shape on particular slide is clicked. I heard macros could be a way to do this, but I have very little knowledge about them. With my research I was able to add a macro and pop out a message box when a shape is clicked.
How can I implement a timer with this? VBA syntax is pretty unfamiliar to me. What happens after timer finishes is another question though.
Ok this is a late answer but for the people coming across such task, I got over this using custom animations in PowerPoint instead of doing it with macros. There is variety of things you can do with animations so it's probably better for you to search internet for specifically what you want to do.