please tell me how to format text in a SINGLE cell of a table.
Once the following text is added. i want to format it in followinfg way.

---------------X_------------------------
Title :

ball
cat
dog

---------X_------------------------
Title : in BOLD and Underline
rest of the data in BULLETS.

Recommended Answers

All 10 Replies

Which Table Cell. Is it in MS-Access u want?
or
Is it any cell in the FlexGrid in VB?

I am refering to Power point Table cell.

If you want this to be changed programmatically then here is the code

Dim iVar As Integer

    'Here you may replace Slide1 with the name of your slide.
    For iVar = 1 To Slide1.Shapes.Count
        'Here any object which is of the type table is taken
        'An error is returned if the cell row or column do not exist.
        If Slide1.Shapes(iVar).Type = msoTable Then
            With Slide1.Shapes(iVar).Table.Cell(1, 1)
                .Shape.TextFrame.TextRange.Font.Name = "Tahoma"
                .Shape.TextFrame.TextRange.Font.Size = 20
            End With
            With Slide1.Shapes(iVar).Table.Cell(3, 1)
                With .Shape.TextFrame.TextRange.ParagraphFormat.Bullet
                    .RelativeSize = 1.25
                    .Font.Color = RGB(255, 0, 255)
                End With
            End With
            With Slide1.Shapes(iVar).Table.Cell(4, 1)
                With .Shape.TextFrame.TextRange.ParagraphFormat.Bullet
                    .RelativeSize = 1.25
                    .Font.Color = RGB(255, 0, 255)
                End With
            End With
            With Slide1.Shapes(iVar).Table.Cell(5, 1)
                With .Shape.TextFrame.TextRange.ParagraphFormat.Bullet
                    .RelativeSize = 1.25
                    .Font.Color = RGB(255, 0, 255)
                End With
            End With
        End If
    Next

In the last post u can substitute any fontname and size in place of Tahoma and 20.

I am refering to same cell.

Title :

Ball
Cat
Dog

Title : in BOLD and Underline
Rest of the data in BULLETS

Dim iVar As Integer

    For iVar = 1 To Slide1.Shapes.Count
        If Slide1.Shapes(iVar).Type = msoTable Then
            With Slide1.Shapes(iVar).Table.Cell(1, 1)
                .Shape.TextFrame.TextRange.Lines(1).Font.Name = "Verdana"
                .Shape.TextFrame.TextRange.Lines(1).Font.Size = 40
                With .Shape.TextFrame.TextRange.Lines(3).ParagraphFormat.Bullet
                    .RelativeSize = 1.25
                    .Font.Color = RGB(255, 0, 255)
                End With
                With .Shape.TextFrame.TextRange.Lines(4).ParagraphFormat.Bullet
                    .RelativeSize = 1.25
                    .Font.Color = RGB(255, 0, 255)
                End With
                With .Shape.TextFrame.TextRange.Lines(5).ParagraphFormat.Bullet
                    .RelativeSize = 1.25
                    .Font.Color = RGB(255, 0, 255)
                End With
            End With
        End If
    Next

Add this line after setting the font size for underline

.Shape.TextFrame.TextRange.Lines(1).Font.Underline = msoCTrue

Also add this line for center alignment of the Title in the cell.

.Shape.TextFrame.TextRange.Lines(1).ParagraphFormat.Alignment = ppAlignCenter

for bold

.Shape.TextFrame.TextRange.Lines(1).Font.Bold = msoCTrue

Thank you....very much

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.