POWR POINTに以下の方法で絵をかけます。EXCELの値を使って絵を書くと
非常にべんりです。
Dim objApp As Object
Dim objPresent As Object
Dim objSlide(10) As Object
Set objApp = CreateObject("PowerPoint.Application")
objApp.Visible = True
Set objPresent = objApp.Presentations.Add(True)
With objPresent
.PageSetup.SlideOrientation = msoOrientationHorizontal
.DefaultShape.Fill.Visible = msoTrue
.DefaultShape.Line.Weight = 0.5
.DefaultShape.Line.ForeColor.RGB = vbBlack
.DefaultShape.Line.Visible = msoTrue
End With
Set objSlide(1) = objPresent.Slides.Add(1, ppLayoutTitleOnly)
With objSlide(1).Shapes.Title
.Left = 10
.Top = 20
.Width = 120
.Height = 25
.TextFrame.TextRange.Text = "TITLE TEXT"
.TextFrame.TextRange.Font.Size = 10
End With
X22 = 100: Y22 = 430
With objSlide(SlideNum).Shapes.AddTextbox(msoTextOrientationHorizontal, X22, Y22, 100, 20)
.TextFrame.TextRange.Text = "TEXT LINE"
.TextFrame.TextRange.Font.NameAscii = "Century"
.TextFrame.TextRange.Font.Size = 4
.TextFrame.WordWrap = False
.NAME = "TEXT1"
End With
ReDim LINEARRAY(1 To ROWNUM, 1 To 2) As Single
For I = 1 To ROWNUM
LINEARRAY(I, 1) = XPLOT(I)
LINEARRAY(I, 2) = YPLOT(I)
Next I
With objSlide(1).Shapes.AddPolyline(LINEARRAY)
.Fill.Visible = msoFalse
.Line.Weight = 1#
.Line.ForeColor.RGB = vbBlue
.Line.Visible = msoTrue
.NAME = "LINENAME"
End With
非常にべんりです。
Dim objApp As Object
Dim objPresent As Object
Dim objSlide(10) As Object
Set objApp = CreateObject("PowerPoint.Application")
objApp.Visible = True
Set objPresent = objApp.Presentations.Add(True)
With objPresent
.PageSetup.SlideOrientation = msoOrientationHorizontal
.DefaultShape.Fill.Visible = msoTrue
.DefaultShape.Line.Weight = 0.5
.DefaultShape.Line.ForeColor.RGB = vbBlack
.DefaultShape.Line.Visible = msoTrue
End With
Set objSlide(1) = objPresent.Slides.Add(1, ppLayoutTitleOnly)
With objSlide(1).Shapes.Title
.Left = 10
.Top = 20
.Width = 120
.Height = 25
.TextFrame.TextRange.Text = "TITLE TEXT"
.TextFrame.TextRange.Font.Size = 10
End With
X22 = 100: Y22 = 430
With objSlide(SlideNum).Shapes.AddTextbox(msoTextOrientationHorizontal, X22, Y22, 100, 20)
.TextFrame.TextRange.Text = "TEXT LINE"
.TextFrame.TextRange.Font.NameAscii = "Century"
.TextFrame.TextRange.Font.Size = 4
.TextFrame.WordWrap = False
.NAME = "TEXT1"
End With
ReDim LINEARRAY(1 To ROWNUM, 1 To 2) As Single
For I = 1 To ROWNUM
LINEARRAY(I, 1) = XPLOT(I)
LINEARRAY(I, 2) = YPLOT(I)
Next I
With objSlide(1).Shapes.AddPolyline(LINEARRAY)
.Fill.Visible = msoFalse
.Line.Weight = 1#
.Line.ForeColor.RGB = vbBlue
.Line.Visible = msoTrue
.NAME = "LINENAME"
End With