Link to home
Start Free TrialLog in
Avatar of jwshome
jwshome

asked on

Restoring automatic bullet characters to indent levels

I hope I'm describing the very specific issue I have correctly, as I am a newcomer to VBA programming for Powerpoint.

In my Poweproint document I have a slide master layout which has a text placeholder containing a bulleted list of text, with five indent levels. Each of the five indent levels has a specific bullet character and font size to differentiate it from the bullet level above and below it. So, for example, indent level one is 20 point font, and the bullet character is a square box; indent level 2 is 18 point font, and the bullet character is a check mark; and so on.

I can use VBA to set all of these parameters in the slide master if I choose to.

Now I create an actual slide using this particular layout from the slide master, and I am presented with a blank content placeholder into which I can type text in bullet-point form. I am able to enter the text using the keyboard and it is formatted properly, and I can use the indent commands in the Paragraph section of the Home tab to set each paragraph to a certain indent level. For example, if I enter the text "This is the first point I want to make" the text is entered at indent level 1, 20 point font with a square box as the bullet. If I click on the 'Indent' icon in the menu, the text will indent further, change to 18 point font, and the bullet character will change to a checkmark.

This all works as it should. Using the keyboard, I can adjust each paragraph (each bullet point) in the list and indent them inwards and outwards, and their formatting and bullet characters will properly follow those that were set in the text placeholder in the slide master layout.

Now imagine that  I have given this document to someone else, who does not like the particular bullet characters I have chosen. They are unfamiliar with the slide master concept, so they don't make any changes to the layouts. They simply go into the actual Powerpoint slide and change the bullet character on the first bullet point on the list, from the square box to, let's say, a hyphen.

When they send me back the document, I run a script to go through all the pages and check to see if anyone has changed any of the bullet characters from those that were specified and change them back again. In my VBA code I am able to find the changes that were made by the other user, and I am able to change the bullet character (e.g. the hyphen) back to the proper character (the square box), using the following code:

                       
If actualbulletcharacter <> properbulletcharacter Then
   shp.TextFrame.TextRange.Paragraphs(p).ParagraphFormat.bullet.Character = properbulletcharacter
End If

Open in new window


The problem is that when I subsequently interact with this paragraph in the actual slide, the bullet point I have assigned using VBA (the square box) 'sticks' to this paragraph even if I change the indent level. If I indent this text to indent level 2, the bullet character is supposed to change to a checkmark, but after I run the code above it stays as a square box, no matter what the indent level is set to. The other aspects of the indent level (the font size, the hanging indent and the left margin) all adjust properly when I increase or decrease the indent level of this paragraph using the indent buttons on the home tab. The only way I can restore the proper indent behavior is to delete the paragraph and re-insert it (either with the keyboard or using VBA).

I'm willing to do that, but I'd really like to understand how to get to the controls for the actual bullet point on the actual slide. I understand that while a content placeholder on a slide master layout has a ruler, and it's own indent levels and related settings, that the actual text box in the actual slide also has its own ruler settings, indent levels, and so forth (it must; otherwise, how could the actual text box maintain its own formatting?). But I cannot figure out how to get at these controls, so I can set the five bullet characters back to the five that are in the slide master layout.

Can anyone help? I hope I've described the problem clearly enough. I can't find anything on the internet - this is a very subtle problem, it seems to me, and pretty hard even to notice the problematic behavior.

Thanks.
Avatar of aikimark
aikimark
Flag of United States of America image

Rather than changing the bullet, how about assigning the bullet style for the proper indentation.
Can you not just reset the slide to follow the master?

Also you need to say which version of office this is.

To get you started try:

With shp.TextFrame.Ruler.Levels(1)
.FirstMargin = 20
.LeftMargin = 60
End With
Avatar of jwshome
jwshome

ASKER

I can fix the problem by other means, like you are suggesting. What I'm interested in is learning how to directly use VBA to change the bullet on an actual page, not on the master.

aikimark, what do you mean "assigning the bullet style"? That sounds promising - how would I do that?
please post a sample presentation file
ASKER CERTIFIED SOLUTION
Avatar of John Wilson
John Wilson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I confess I'm baffled about building visual/graphic presentations in text but okay.

JSRWilson is right. Reset is easy. If you want to select all slides and do it all in one shot, I believe you can do that too.

In PowerPoint 2010 (and I believe 2007 also), just click the Reset Button in the new slide group on the Home Tab of the Ribbon.

User generated imageIf you are using 2010, you can also compare your version and their version and surgically accept/reject changes rather than blowing off their edits entirely.

I'm definitely not offering a VBA solution, just suggesting this might require a little interactivity. After 15+ yrs working with PowerPoint, I can assure you, each slide needs visual inspection before it's show time.
I've requested that this question be deleted for the following reason:

The question has either no comments or not enough useful information to be called an &quot;answer&quot;.
I think that JSRWilson's comments were on point and provided sufficient instruction to correct the questioner's problem.

The fact that the questioner did not respond to requests for version does not diminish the effort or validity of the JSRWilson's information.

Points should be awarded.
JSRWilson's comments should be accepted as an answer. As requested by the moderator, I've added a link to JSRWilson's last comment.

https://www.experts-exchange.com/questions/27724440/Restoring-automatic-bullet-characters-to-indent-levels.html?anchorAnswerId=38017823#a38017823

If the questioner does not think his question was answered, then he should have restated the question differently or provided additional information.