B
Bjorn Haman
Hi people,
perhaps someone can help me out here.
I'm currently developing an ActiveX DLL (in VB6) that will take a text
string and paste it as a comment on a powerpoint slide (Powerpoint 2000).
The following code works:
Dim oPowerPointApplication As powerpoint.Application
Set oPowerPointApplication = CreateObject("powerpoint.application")
DoEvents
oPowerPointApplication.Visible = msoTrue
DoEvents
Dim oPowerPointPresentation As powerpoint.Presentation
Set oPowerPointPresentation =
oPowerPointApplication.Presentations.Add(msoTrue)
DoEvents
oPowerPointApplication.ActiveWindow.ViewType = ppViewNormal
DoEvents
Dim oPowerPointSlide As powerpoint.Slide
Set oPowerPointSlide = oPowerPointPresentation.Slides.Add(1, 1)
DoEvents
With oPowerPointSlide.Shapes.AddComment(100, 100, 150, 150)
.TextFrame.TextRange.Text = .TextFrame _
.TextRange.Text = "Test Comment"
End With
However,
I want to do this WITHOUT having to use the Powerpoint graphical interface
(IE remove the line oPowerPointApplication.Visible = msoTrue), but when i Do
this an error is raised at:
oPowerPointApplication.ActiveWindow.ViewType = ppViewNormal (Because this
line requires the Powerpoint.application to be in a 'slide view'.
Does anyone have a clue on how to solve this?
Kind Regards
/Bjorn Haman, (e-mail address removed)
perhaps someone can help me out here.
I'm currently developing an ActiveX DLL (in VB6) that will take a text
string and paste it as a comment on a powerpoint slide (Powerpoint 2000).
The following code works:
Dim oPowerPointApplication As powerpoint.Application
Set oPowerPointApplication = CreateObject("powerpoint.application")
DoEvents
oPowerPointApplication.Visible = msoTrue
DoEvents
Dim oPowerPointPresentation As powerpoint.Presentation
Set oPowerPointPresentation =
oPowerPointApplication.Presentations.Add(msoTrue)
DoEvents
oPowerPointApplication.ActiveWindow.ViewType = ppViewNormal
DoEvents
Dim oPowerPointSlide As powerpoint.Slide
Set oPowerPointSlide = oPowerPointPresentation.Slides.Add(1, 1)
DoEvents
With oPowerPointSlide.Shapes.AddComment(100, 100, 150, 150)
.TextFrame.TextRange.Text = .TextFrame _
.TextRange.Text = "Test Comment"
End With
However,
I want to do this WITHOUT having to use the Powerpoint graphical interface
(IE remove the line oPowerPointApplication.Visible = msoTrue), but when i Do
this an error is raised at:
oPowerPointApplication.ActiveWindow.ViewType = ppViewNormal (Because this
line requires the Powerpoint.application to be in a 'slide view'.
Does anyone have a clue on how to solve this?
Kind Regards
/Bjorn Haman, (e-mail address removed)