rleyba828
asked on
Powerpoint VBA, reading a file and displaying the text on a slide.
Hi Team,
Just need help finishing a snippet of code from here -->http://www.pptfaq.com/FAQ00913_Use_VBA_to_read_text_from_a_file.htm. I am using Powerpoint 2010.
We have a Help Desk Center where we need to display on large screens live stats that are updated by some external scripts. e.g. files generated would be numbers for NewIncidents.txt, UrgentTickets.txt, AgedTickets.txt
I am not a VBA programmer, but based on the example in the link above, how do I make a looping powerpoint presentation that will open 3 text files, as above, assign the contents to VBA variables and have Powerpoint display them, one variable per slide (say 15 seconds per slide together with some title text on the slide), then at the end of the presentation, VBA will re-read the files again in case they changed, then loop back to the start?
Thanks very much.
Just need help finishing a snippet of code from here -->http://www.pptfaq.com/FAQ00913_Use_VBA_to_read_text_from_a_file.htm. I am using Powerpoint 2010.
We have a Help Desk Center where we need to display on large screens live stats that are updated by some external scripts. e.g. files generated would be numbers for NewIncidents.txt, UrgentTickets.txt, AgedTickets.txt
I am not a VBA programmer, but based on the example in the link above, how do I make a looping powerpoint presentation that will open 3 text files, as above, assign the contents to VBA variables and have Powerpoint display them, one variable per slide (say 15 seconds per slide together with some title text on the slide), then at the end of the presentation, VBA will re-read the files again in case they changed, then loop back to the start?
Thanks very much.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Robert,
Thanks for this...I followed the steps to modify security settings, and everything is working fine. Great help.
Thanks for this...I followed the steps to modify security settings, and everything is working fine. Great help.
I thought this would be an ideal way to do what you want: when the slide changes, read the file based on slide index and put the contents in it.
What you need for that is an add-in for example: http://skp.mvps.org/autoevents.htm
Note that you need to follow the instructions carefully; on lowering macro security (follow the link below the code on the page you posted), on installing the add-in and then you need to enable the events in the new menu it creates under Tools.
Settings may depend on your PPT version as well, I have a pretty old version but it works nice.
Attached is a zip file with the slideshow (already set up for 15 seconds, repeat, kiosk mode) and some example text files.
FileShow.zip