Hi Mudassir,
I have solved the problem. Turns out the colors were coming from the rectangle, not the text field. I have changed the routine that copies the fields to the output presentation to:
Protected Sub CopyArtTitleEtc(ByVal oSlide As SlideEx, ByVal oTemplateSlide As SlideEx)
Dim oAutoShape As AutoShapeEx
Dim oNewShape As AutoShapeEx
Dim iShape As Integer
For Each oAutoShape In oTemplateSlide.Shapes
If ControlUtilities.StringIsNotEmpty(oAutoShape.AlternativeText) Then
iShape = oSlide.Shapes.AddAutoShape(ShapeTypeEx.Rectangle, oAutoShape.X, oAutoShape.Y, oAutoShape.Width, oAutoShape.Height)
oNewShape = oSlide.Shapes(iShape)
PPTx.copyTextFrame(oNewShape, oAutoShape)
oNewShape.FillFormat.FillType = FillTypeEx.NoFill
oNewShape.LineFormat.FillFormat.FillType = FillTypeEx.NoFill
oNewShape.TextFrame.Paragraphs(0).Portions(0).FillFormat.FillType = FillTypeEx.Solid
oNewShape.TextFrame.Paragraphs(0).Portions(0).FillFormat.SolidFillColor.Color = Drawing.Color.Black
oNewShape.AlternativeText = oAutoShape.AlternativeText
End If
Next
End Sub
The part that is indented changes the fill color and line color of the rectangle and then changes the text color in the text field.
For anyone interested in this solution, this is the copyTextFrame used in the above routine:
Public Shared Sub copyTextFrame(ByVal oDest As AutoShapeEx, ByVal oSour As AutoShapeEx)
Dim oTextDest As TextFrameEx
Dim oTextSour As TextFrameEx
Dim oParaDest As ParagraphEx
Dim oParaSour As ParagraphEx
Dim oPortDest As PortionEx
Dim oPortSour As PortionEx
oDest.FillFormat.FillType = oSour.FillFormat.FillType
oDest.LineFormat.FillFormat.FillType = oSour.LineFormat.FillFormat.FillType
oTextSour = oSour.TextFrame
oTextDest = oDest.TextFrame
oTextDest.Paragraphs.Clear()
For Each oParaSour In oTextSour.Paragraphs
oParaDest = New ParagraphEx(oParaSour)
oParaDest.Portions.Clear()
For Each oPortSour In oParaSour.Portions
oPortDest = New PortionEx(oPortSour)
oParaDest.Portions.Add(oPortDest)
Next
oParaDest.RawAlignment = oParaSour.RawAlignment
oTextDest.Paragraphs.Add(oParaDest)
Next
End Sub
Anyway, this problem is solved.
Thanks for all your help.
Brad