Quantcast
Channel: Open XML Format SDK forum
Viewing all articles
Browse latest Browse all 1288

Refactoring VBA script involving With keyword

$
0
0
Hi,

In a loop, I have a 2 by 1 table in PowerPoint slides that as I create them, I format them. How can I refactor this, please?

   
 With pptTable.Table.Cell(1, 1).Shape
                        .TextFrame.TextRange.Font.Name = "Calibri"
                        .TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignRight
                        '.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter
                        .TextFrame.TextRange.Font.Size = 54
                        .TextFrame2.VerticalAnchor = msoAnchorMiddle
                        'pptTable.Table..Rows(lRow).Height = 40
End With
With pptTable.Table.Cell(2, 1).Shape
                        .TextFrame.TextRange.Font.Name = "Calibri"
                        .TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignRight
                        '.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter
                        .TextFrame.TextRange.Font.Size = 54
                        .TextFrame2.VerticalAnchor = msoAnchorMiddle
                        'pptTable.Table..Rows(lRow).Height = 40
End With






Viewing all articles
Browse latest Browse all 1288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>