Home > Software engineering >  Automation error
Automation error

Time:09-24

Red is marked after debugging code,
Private Sub OutPutPPt ()
The Set ptApp=New PowerPoint. Application
PtApp. Visible=msoTrue
Dim ptPres As Presentation
The Set ptPres=ptApp. Presentations. The Add
Dim ptSlide As Slide
Dim pcLayout As CustomLayout
The Set pcLayout=ptPres. SlideMaster. CustomLayouts. Add (1)
The Set ptSlide=ptPres. Slides TAB. AddSlide (1, pcLayout)
ptSlide. Background. The Fill. UserPicture "C: \ Users \ BIMTech \ Desktop \ picture 1. The PNG"
PtSlide. Shapes (1). The Top=160
PtSlide. Shapes (1). Left=50
PtSlide. Shapes (1). The Width=600
PtSlide. Shapes (1). Height=180
PtSlide. Shapes (1). The Fill. BackColor. RGB=RGB (79, 129, 189)
PtSlide. Shapes (1). TextFrame. TextRange. Text=Title
Dim I
For I=0 To UBound (Datas)
Label4. Caption="is written to... "
The Set ptSlide=ptPres. Slides TAB. AddSlide (I + 2, pcLayout)
PtSlide. Background. The Fill. UserPicture "C: \ Users \ BIMTech \ Desktop \ picture 1. The PNG"
With ptSlide. Shapes. AddTable (2, 1, 30, 30)
. A Table. Rows (1). Height=100
. A Table. Rows (2). Height=350
. Table. The Cell (1, 1). The Split 2, 2
. Table. The Columns (1). The Width=120
. Table. The Columns (2). The Width=540
. Table. The Cell (1, 1). The Shape. The Fill. BackColor. RGB=RGB (79, 129, 189)
. Table. The Cell (1, 2) Shape. The Fill. BackColor. RGB=RGB (79, 129, 189)
. Table. The Cell (1, 1). The Shape. TextFrame. TextRange. Text=Datas (I). ImpactID
. Table. The Cell (1, 2) Shape. TextFrame. TextRange. Text=Datas (I). ImpactAdress
. Table. The Cell (2, 1). The Shape. TextFrame. TextRange. Text=Datas (I). The Floor

. Table. The Cell (2, 2). The Split 1, 2
. Table. The Cell (2, 2) Shape. TextFrame. TextRange. Text=Datas (I). ProName1
. Table. The Cell (2, 3) Shape. TextFrame. TextRange. Text=Datas (I). ProName2
. Table. The Cell (3, 1). The Split 1, 2
PtSlide. Shapes. AddPicture Datas (I) PictureLink, msoFalse, msoTrue, 35, 135, 305, 310
End With
PtSlide. Shapes. The Item (1). The Delete
Label4. Caption="is written to... "
Next
MsgBox "written!"
'ptPres. SaveAs FolderName & amp; The Title & amp; "PPT"
'ptPres. Close
'Set ptApp=Nothing
End Sub

CodePudding user response:

I went to,,,, too yellow




-- -- -- -- -- -- -- -- -- -- -- -- -- I changed for you,,

CodePudding user response:

Wait for a great god,,,, I am a little white,,,, very white
  • Related