Creating a PPT macro to send slide to section based on day/time - vba

First time poster here! I am hoping someone can help me find a way to create a macro that would direct the powerpoint to advance to a certain section depending on the day/time. I have four sections (weekdayAM, weekdayPM, weekendAM, weekendPM) and a single slide at the start of the presentation with a textbox start button. Ideally, I would like to enable an onclick macro to direct to the appropriate section based on the day/time conditions.
Any ideas?

Related

Looking to record a macro in word, but picture options aren't available

Currently trying to build a macro in word so that I can simply select a picture I've pasted in the document, then click on the macro so that it sets the layout option of the selected picture to square, and the distance from text below it to 0.1". However, the record macro button doesn't allow me to select a picture, nor can I figure out how to build it from scratch as I don't even know where to start. Any help to get my on my way would be greatly appreciated. Thank you!

VBA - applying bullet-point style from the slide master to selected text boxes

In VBA for PowerPoint, I want to applying bullet-point style from the slide master to selected text boxes. Is this even possible? I've been searching the internet for ages on this, and can't seem to find anything even close.
I can select or place text boxes on the slide in VBA, but I want to use the bullet-point layout as defined on the slide master - I just don't know how to select it, and once selected I assume I use the Shape.PickUp and Apply (or is there another way of doing this that I haven't thought of?)
Any help greatly appreciated.
David.

Powerpoint Changing Slide at Specific Time

I was wondering if there is a script that I can add to my powerpoint presentation to allow it to change to a specific slide at a given computer time.
For example I would like the powerpoint to loop through some slides and then at 10am I would like it to go to a slide that is hidden from the loop and stay at that slide. I was wondering if that could be done? If possible that would be amazing and I would love it if it could :)
See this link: social.msdn.microsoft.com/forums/en-US/… to create a timer for PowerPoint.
Then put code in to check the current time vs the time you want to go to the slide and then if the time has reached this time, go to that slide.

Control Button to initiate the writing of a new VBA macro

Would it be possible to have a control button (or any mechanism) that once clicked on, a textbox would appear with fields like macro name Sub "NewMacroTitle"(), a field for the date, a field for reference sources ("Getting Links/URL from a webpage-Excel VBA"found this here"), a brief description of what the macro is to do. All of these fields, except Sub "NewMacroTitle"(), would start with a ' to show a comment and all of this would be inserted into the VBA editor, or enter it into cells on a spreadsheet that could then be copied and pasted into the VBA editor.
My problem is this. I'm new to VBA. I'm also the world's worst at documenting macros. I get an idea for a macro, I'm off into the VBA editor writing away, maybe even get the macro complete. A week later I'm reviewing the macro and the first thing is "what the heck does this thing do?"
I hope you see what I'm trying to do, essentially some way to force me to document the macro before even starting the actual code.
There are tools that will add pre-defined text to the header and/or footer of a sub. I use the one from MZ Tools for error handling code and adding my name and date to the header of each proc. It is worth a look.

VBA script to insert anchor position for autoshapes in Microsoft Word 2007

I'm beyond the limits of my kindergarten-level VBA skills so would like to ask if anyone here can help me write a VBA script to help me work stepwise through my Word document and adjust the anchoring position of all the AutoShapes in the document.
I have a 400-page book in Microsoft Word with at least one and sometimes several marginalia (sidenote) on each page in a thin column to the left of the main body text column. These sidenotes are a concise 'pointer' to a particular point made in the body text and need to appear directly to that point's left.
Each sidenote is in its own AutoShape (within a textbox in that shape). The AutoShapes were placed by the author in an inconsistent way. Mostly they are anchored to a position on the page.
However, I need to repaginate. This will cause the body text to flow differently and I need the sidenotes to flow with it (approximately or exactly)!
So before I repaginate I want to make sure I anchor each AutoShape to the paragraph it belongs to and not to the page it is currently on.
I don't know if that can be done automatically, since I don't know how Word could deduce a purely spatial relationship between an AutoShape and a paragraph.
So I'm guessing I have to make do with a "semi-automatic" process. Something like this:
Press a button to start VBA script
Select next AutoShape
Prompt for user to enter cursor in body text where anchor is to be placed
Resume macro
Place anchor for that AutoShape in that position
Change vertical position paramater of AutoShape to "relative to paragraph"
and "0 mm"
(Alternative, not 0 mm but another value deduced to more
accurately position AutoShape)
Change width parameter of AutoShape to
a particular fixed value 37 mm (some of them were a little
inaccurately drawn)
End cycle and go back to beginning to
Select next AutoShape
Hope that is all understandable.
I've tried to record a VBA script to do some of this but have no idea how to build in the user prompt.
Any help much appreciated!
Craig
You may be better off creating a macro that works on one shape at a time, or anchor all the shapes manually (which you're almost doing anyway) and then write a macro to take care of the various parameters and settings you want.
If you really want to prompt the user while the macro is running you'll need to look into modeless dialogs (not possible on the Mac). See this link: http://www.bettersolutions.com/vba/VXV113/SE846743531.htm
Basically, you'd have to create your own dialog and then show it modelessly so that the user could still place the cursor before hitting OK. If you're new to VBA, this could be difficult to set up.
While searching for solutions to this, I found a post on another forum from someone trying to do something very similar. He was developing a set of tools for editors using Word and until I find the ultimate solution I am using his "Shapes" tool which allows me to change parameters on each AutoShape I select at-a-click instead of opening up and closing a dialogue box each time, plus selecting a different tab each time... His tools can be downloaded at his Editors' Toolkit website.