wendymelon
May 17th, 2004, 08:42 PM
What does this mean?
Line 31: Class PowerPointCtl.Slide of control Slide1 was not a loaded control class.
my code:
Private Sub Form_Load()
Dim ppNewSlide As PowerPoint.Slide
Dim ppShape As PowerPoint.Shape
Dim lngSlideHeight As Long
Dim lngSlideWidth As Long
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};DATABASE=dbtest01;SERVER=localhost;OPTION=0;STMT=;"
query = "SELECT * FROM tempprint"
cn.Open
rs.Open query, cn, adOpenDynamic, adLockUnspecified
Set ppApp = New PowerPoint.Application
Set ppPresent = ppApp.Presentations.Add(msoTrue)
Do While Not rs.EOF
Set ppNewSlide = ppPresent.Slides.Add(ppPresent.Slides.Count + 1, ppLayoutBlank)
ppNewSlide.ColorScheme = ppPresent.ColorSchemes(3)
Set ppShape = ppNewSlide.Shapes.AddPicture("C:\Documents and Settings\wendysia\Desktop\Logo\logo without word.jpg", msoCTrue, msoTrue, 300, 40, 150, 100)
Set ppShape = ppNewSlide.Shapes.AddTextbox(msoTextOrientationHorizontal, 170, 150, 400, 30)
ppShape.Line.DashStyle = msoLineSolid
ppShape.Line.Weight = 2
ppShape.Line.BackColor.RGB = RGB(0, 0, 0)
ppShape.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter
ppShape.TextFrame.TextRange.Font.Size = 50
ppShape.TextFrame.TextRange.Font.Bold = msoTrue
ppShape.TextFrame.TextRange.Font.Name = "Arial Black"
ppShape.TextFrame.TextRange.Text = "EMPLOYEE PASS"
Set ppShape = ppNewSlide.Shapes.AddPicture(rs!photo, msoCTrue, msoTrue, 80, 190, 200, 270)
Set ppShape = ppNewSlide.Shapes.AddTextbox(msoTextOrientationHorizontal, 320, 230, 400, 50)
ppShape.TextFrame.TextRange.Font.Bold = msoTrue
ppShape.TextFrame.TextRange.Font.Name = "Arial Black"
ppShape.TextFrame.TextRange.Font.Size = 28
ppShape.TextFrame.TextRange.Text = rs!Emp_ID
Set ppShape = ppNewSlide.Shapes.AddTextbox(msoTextOrientationHorizontal, 320, 280, 400, 50)
ppShape.TextFrame.TextRange.Font.Bold = msoTrue
ppShape.TextFrame.TextRange.Font.Name = "Arial Black"
ppShape.TextFrame.TextRange.Font.Size = 28
ppShape.TextFrame.TextRange.Text = rs!Emp_Name
Set ppShape = ppNewSlide.Shapes.AddTextbox(msoTextOrientationHorizontal, 320, 330, 400, 50)
ppShape.TextFrame.TextRange.Font.Bold = msoTrue
ppShape.TextFrame.TextRange.Font.Name = "Arial Black"
ppShape.TextFrame.TextRange.Font.Size = 28
ppShape.TextFrame.TextRange.Text = rs!Department
rs.MoveNext
Loop
ppApp.Visible = msoTrue
' Set ppPresent = ppApp.Presentations.Open("C:\Documents and Settings\wendysia\Desktop\VB\sample2.ppt")
' Do While Not rs.EOF
'
' Loop
'
End Sub
Can somebody help me pleaseeeeeee........ :blush: :( :blush: :( :cry: :cry:
Line 31: Class PowerPointCtl.Slide of control Slide1 was not a loaded control class.
my code:
Private Sub Form_Load()
Dim ppNewSlide As PowerPoint.Slide
Dim ppShape As PowerPoint.Shape
Dim lngSlideHeight As Long
Dim lngSlideWidth As Long
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};DATABASE=dbtest01;SERVER=localhost;OPTION=0;STMT=;"
query = "SELECT * FROM tempprint"
cn.Open
rs.Open query, cn, adOpenDynamic, adLockUnspecified
Set ppApp = New PowerPoint.Application
Set ppPresent = ppApp.Presentations.Add(msoTrue)
Do While Not rs.EOF
Set ppNewSlide = ppPresent.Slides.Add(ppPresent.Slides.Count + 1, ppLayoutBlank)
ppNewSlide.ColorScheme = ppPresent.ColorSchemes(3)
Set ppShape = ppNewSlide.Shapes.AddPicture("C:\Documents and Settings\wendysia\Desktop\Logo\logo without word.jpg", msoCTrue, msoTrue, 300, 40, 150, 100)
Set ppShape = ppNewSlide.Shapes.AddTextbox(msoTextOrientationHorizontal, 170, 150, 400, 30)
ppShape.Line.DashStyle = msoLineSolid
ppShape.Line.Weight = 2
ppShape.Line.BackColor.RGB = RGB(0, 0, 0)
ppShape.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter
ppShape.TextFrame.TextRange.Font.Size = 50
ppShape.TextFrame.TextRange.Font.Bold = msoTrue
ppShape.TextFrame.TextRange.Font.Name = "Arial Black"
ppShape.TextFrame.TextRange.Text = "EMPLOYEE PASS"
Set ppShape = ppNewSlide.Shapes.AddPicture(rs!photo, msoCTrue, msoTrue, 80, 190, 200, 270)
Set ppShape = ppNewSlide.Shapes.AddTextbox(msoTextOrientationHorizontal, 320, 230, 400, 50)
ppShape.TextFrame.TextRange.Font.Bold = msoTrue
ppShape.TextFrame.TextRange.Font.Name = "Arial Black"
ppShape.TextFrame.TextRange.Font.Size = 28
ppShape.TextFrame.TextRange.Text = rs!Emp_ID
Set ppShape = ppNewSlide.Shapes.AddTextbox(msoTextOrientationHorizontal, 320, 280, 400, 50)
ppShape.TextFrame.TextRange.Font.Bold = msoTrue
ppShape.TextFrame.TextRange.Font.Name = "Arial Black"
ppShape.TextFrame.TextRange.Font.Size = 28
ppShape.TextFrame.TextRange.Text = rs!Emp_Name
Set ppShape = ppNewSlide.Shapes.AddTextbox(msoTextOrientationHorizontal, 320, 330, 400, 50)
ppShape.TextFrame.TextRange.Font.Bold = msoTrue
ppShape.TextFrame.TextRange.Font.Name = "Arial Black"
ppShape.TextFrame.TextRange.Font.Size = 28
ppShape.TextFrame.TextRange.Text = rs!Department
rs.MoveNext
Loop
ppApp.Visible = msoTrue
' Set ppPresent = ppApp.Presentations.Open("C:\Documents and Settings\wendysia\Desktop\VB\sample2.ppt")
' Do While Not rs.EOF
'
' Loop
'
End Sub
Can somebody help me pleaseeeeeee........ :blush: :( :blush: :( :cry: :cry: