Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set border in powerpoint with a macro

Status
Not open for further replies.

Eli20

Programmer
Oct 30, 2003
119
0
0
MX
hi, im creating a table in a power presentacion using a macro.

how cani change the border and line properties of the table by code??

thank you very much

Eli
 
Can you please post the code creating the table ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
hi, actually im trying to build an automation program for power point using Visual Basic .net.

the code i use to create the table is this:

Code:
With App.ActiveWindow.Selection 
    .SlideRange.Shapes.AddTable(intRows, intCols, sngLeft, sngTop, sngHeight, sngWidth).Select()
    .ShapeRange.Width = sngWidth
    .ShapeRange.Height = sngHeight

and then i iterate throgh the cells to set the text properties:

Code:
For y = 0 To dt.Rows.Count - 1
    For z = 0 To dt.Columns.Count - 1
       .ShapeRange.GroupItems(Index:=tot).TextFrame.TextRange.Characters(Start:=1, Length:=0).Select()

        .TextRange.Characters(Start:=1, length:=0).Select()
        .TextRange.Text = dt.Rows(y)(z)
        .TextRange.Font.Name = strFontName
        .TextRange.Font.Size = intFontSize
        .TextRange.Font.Italic = intFontItalic
        .TextRange.Font.Bold = intFontBold
        .TextRange.Font.Color.RGB = RGB(intR, intG, intB)


        if intAlignment > 0 Then
           .TextRange.Paragraphs(1, 1).ParagraphFormat.Alignment = intAlignment
        End If
            tot = tot - 1
   Next
Next

But i cannt find how to modify the border properties of the table, thats the only thing im missing.

can anybody help me?

thank you very much.

Eli
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top