Home > Software engineering >  Vb editor PPT
Vb editor PPT

Time:11-19

Via the shell open a PPT, how to use variables instead of PPT, so then I can edit the PPT

CodePudding user response:

Should not use the shell open, should write like this:
 
Sub test ()
Dim pptApp As New PowerPoint. Application
Dim MyPresentation As Presentation
The Set MyPresentation=pptApp. Presentations. Open (" d: \ asd. PPTX ")
MyPresentation. Slides TAB (1). Shapes. AddTextbox 1, 40, 160, 650, 50 'add a text box
'...
End Sub

CodePudding user response:

reference 1st floor milaoshu1020 response:
should not use the shell open, should write like this:
 
Sub test ()
Dim pptApp As New PowerPoint. Application
Dim MyPresentation As Presentation
The Set MyPresentation=pptApp. Presentations. Open (" d: \ asd. PPTX ")
MyPresentation. Slides TAB (1). Shapes. AddTextbox 1, 40, 160, 650, 50 'add a text box
'...
End Sub

Set the sentence has a problem, said PowerPointframe window dosed the not exist

CodePudding user response:

reference 1st floor milaoshu1020 response:
should not use the shell open, should write like this:
 
Sub test ()
Dim pptApp As New PowerPoint. Application
Dim MyPresentation As Presentation
The Set MyPresentation=pptApp. Presentations. Open (" d: \ asd. PPTX ")
MyPresentation. Slides TAB (1). Shapes. AddTextbox 1, 40, 160, 650, 50 'add a text box
'...
End Sub

Run-time error - 2147188160 (80048240).

CodePudding user response:

See your screenshot, is to use VBA in excel to start the PPT,
So you need to be referenced powerpoint

Menu - tools - reference
Inside the popup window to find your powerpoint, hook up, and then with this code of Mickey Mouse,



CodePudding user response:

CodePudding user response:

Macro PPT to print the current page how to do? Great god help!

CodePudding user response:

Reference no problem, just want to edit PPT, after the report is convenient, the example can be used, the first floor is my computer don't know what's the matter, to open the PPT, in order to run the program

CodePudding user response:

refer to 7th floor dooney_huang response:
reference no problem, just want to edit PPT, after the report is convenient, the example can be used, the first floor is my computer don't know what's the matter, to open the PPT, to run the program

 
Sub test ()
Dim pptApp As New PowerPoint. Application
PptApp. Visible=true 'add this, try?
Dim MyPresentation As Presentation
The Set MyPresentation=pptApp. Presentations. Open (" d: \ asd. PPTX ")
MyPresentation. Slides TAB (1). Shapes. AddTextbox 1, 40, 160, 650, 50 'add a text box
'...
End Sub

CodePudding user response:

refer to the eighth floor milaoshu1020 response:
Quote: refer to 7th floor dooney_huang response:

Reference no problem, just want to edit PPT, after the report is convenient, the example can be used, the first floor is my computer don't know what's the matter, to open the PPT, to run the program

 
Sub test ()
Dim pptApp As New PowerPoint. Application
PptApp. Visible=true 'add this, try?
Dim MyPresentation As Presentation
The Set MyPresentation=pptApp. Presentations. Open (" d: \ asd. PPTX ")
MyPresentation. Slides TAB (1). Shapes. AddTextbox 1, 40, 160, 650, 50 'add a text box
'...
End Sub

Perfect,,,,,,,,
  •  Tags:  
  • VBA
  • Related