Solved VBA code to bold part of a a string in Powerpoint

The Rev

Registered User.
Local time
Today, 12:53
Joined
Jan 15, 2003
Messages
118
I have a slide on a Powerpoint that I fill with some calculated values from my database. The PowerPoint template slide has 7 bullet items. I treat each one as a paragraph and format each paragraph as I need. However, on my 6th paragraph, I need to bold the date portion of the string using the variable assigned to the date field from Access. I can bold the whole bullet item or not bold it, but I can't figure out how to tell it to just bold the date part.

The bullet item text is:

By MMM DD, YYYY: No later than 60 days upon completion

I am replacing MMM DD, YYYY with my variable SixtyDay in the VBA code. But I have no idea how to select that part and bold it. I've tried using the .Find approach, but it hangs at the loop. Here's my find text. How do I bold the date alone there?

objShape.TextFrame.TextRange.Find(SixtyDay)
 
Is it anything like Excel or Word, with Range & Characters?

I use something like this in Excel, with varied levels of success/glitch-y ness:

' With rngCell.Characters(Start:=lngStartPosition, Length:=lngWordLength).Font
' .Color = -16776961
' End With
 
Is it anything like Excel or Word, with Range & Characters?

I use something like this in Excel, with varied levels of success/glitch-y ness:

' With rngCell.Characters(Start:=lngStartPosition, Length:=lngWordLength).Font
' .Color = -16776961
' End With
Unfortunately, no.
 
Got it. So simple, it's almost stupid...

objShape.TextFrame.TextRange.Paragraphs(6).Words(2, 4).Font.Bold = True
 

Users who are viewing this thread

Back
Top Bottom