views:

34

answers:

1

so if I have a DAO recordset returing values, and I use Format$, is there a way to set the font property of what is only contained within the Format$ portion?

For example I have this:

"Metric #43 = " & Format$(rs!Metric43, "Yes/No")

so this is actually for ppt automation, not an access form. I want the first string to be unbold, and the returned value to be bold. So i have a ppt template that I use to accomplish this, which contains a text box i refer to. the text box is set to Not-Bold by default, and I was wondering if I could set some font property within the Format$ portion to get where I want to go with this??

may be totally off, but just wondering

thanks Justin

+1  A: 

You can't use the format command, but you can use the text box object in power point and set the font and text and box.

This code is from inside of PP, but just modify it for automation:

Dim strT     As String
Dim sp       As Shape

strT = "Yes/No"

Set sp = Application.ActivePresentation.Slides(1).Shapes(2)

sp.TextFrame.TextRange = strT
sp.TextFrame.TextRange.Characters(1, 3).Font.Bold = True
sp.TextFrame.TextRange.Characters(1, 3).Font.Name = "Arial"
sp.TextFrame.TextRange.Characters(1, 3).Font.Size = 18

So, setting of the font, font name, and size is possbile.

Albert D. Kallal
yeah that works just fine! Thanks very much! I am actually already making the references just as you did above to pass the data, just needed to add .cahracter, etc! I appreciate it!
Justin