My code creates a new PP presentation and applies a user selectable PP template. The code also creates a table based on Access data parameters. I am able to format the PP table boarders and fill .... just not the font size.
Partial code below:
...
Expand|Select|Wrap|Line Numbers
- 'POWERPOINT
- Dim pptObj As PowerPoint.Application
- Dim pptPres As PowerPoint.Presentation
- Dim pptSlide As Slide
- ...
- 'Create a new file from an existing PowerPoint template
- Set fd = Application.FileDialog(msoFileDialogOpen) 'Open dialog to ask user to select PowerPoint template
- With fd
- .Show
- pptfile = .SelectedItems(1)
- End With
- Set pptObj = CreateObject("PowerPoint.Application")
- With pptObj
- .Visible = True
- End With
- Set pptPres = pptObj.Presentations.Add
- ...
- lngX = 1
- lngY = 1
- lngShapeID = 2
- With pptPres '1st With Statement
- With .Slides.Add(pptPres.Slides.Count + 1, ppLayoutTitle) '2nd Withstatement
- .ApplyTemplate (pptfile) 'apply powerpoint template file selected by user
- .Shapes.AddTable (ABSFindRecordCount + COMMFindRecordCount + InstrumFindRecordCount + MDIOCFindRecordCount + RangesFindRecordCount + SBSFindRecordCount + TSSFindRecordCount + 1), 6, 3, 90, 300, 60 'rows+header, columns,horizontal center, vertical center, width, height
- lngX = 1
- lngY = 1
- lngShapeID = 2
- 'Format table columns
- lngShapeID = lngShapeID + 1
- With .Shapes(lngShapeID).Table '3rd With Statement
- .Columns(1).Width = 187
- .Columns(2).Width = 85
- .Columns(3).Width = 85
- .Columns(4).Width = 85
- .Columns(5).Width = 85
- .Columns(6).Width = 187
- 'format table, no fill, black boarder
- .ApplyStyle ("{5940675A-B579-460E-94D1-54222C63F5DA}")
Thanks, in advance, for any help!!