| 
    
     |  | H. C. Shinopy さん 
 先日はありがとうございました.
 実はプログラムを今まで使ったりしたことがなかったので,
 1文1文,意味を理解しながら,試しました.
 
 先日教えてもらったのを参考に以下のマクロを作りました.
 
 実行すると,「エラー13 型が一致しません」
 となりました.これは,わたしのWordが2000で,H. C. Shinopyさんのが2002
 だからなのでしょうか?
 
 お忙しいことと思いますが,
 もしよければ教えてください.ほんと,ひとつの話題でこんなにもしつこくて,すいません..
 
 ****************************************
 
 Sub Macro2()
 '
 ' Macro2 Macro
 ' 記録日 2004/05/24 記録者 TSUZAN
 '
 Selection.InlineShapes.AddPicture FileName:= _
 "C:\WORK\SENC21\2004\matusima\EMF\W2.40.1.emf", LinkToFile:=False, _
 SaveWithDocument:=True
 Selection.TypeBackspace
 Selection.InlineShapes(1).Fill.Visible = msoFalse
 Selection.InlineShapes(1).Fill.Transparency = 0#
 Selection.InlineShapes(1).Line.Weight = 0.75
 Selection.InlineShapes(1).Line.Transparency = 0#
 Selection.InlineShapes(1).Line.Visible = msoFalse
 Selection.InlineShapes(1).LockAspectRatio = msoTrue
 Selection.InlineShapes(1).Height = 379.45
 Selection.InlineShapes(1).Width = 407.8
 Selection.InlineShapes(1).PictureFormat.Brightness = 0.5
 Selection.InlineShapes(1).PictureFormat.Contrast = 0.5
 Selection.InlineShapes(1).PictureFormat.ColorType = msoPictureAutomatic
 Selection.InlineShapes(1).PictureFormat.CropLeft = 0#
 Selection.InlineShapes(1).PictureFormat.CropRight = 0#
 Selection.InlineShapes(1).PictureFormat.CropTop = 0#
 Selection.InlineShapes(1).PictureFormat.CropBottom = 0#
 Selection.MoveRight Unit:=wdCharacter, Count:=1
 Selection.TypeParagraph
 Selection.TypeParagraph
 Selection.InsertBreak Type:=wdPageBreak
 
 
 Selection.InlineShapes.AddPicture FileName:= _
 "C:\WORK\SENC21\2004\matusima\EMF\W2.40.2.emf", LinkToFile:=False, _
 SaveWithDocument:=True
 Selection.TypeBackspace
 Selection.InlineShapes(1).Fill.Visible = msoFalse
 Selection.InlineShapes(1).Fill.Transparency = 0#
 Selection.InlineShapes(1).Line.Weight = 0.75
 Selection.InlineShapes(1).Line.Transparency = 0#
 Selection.InlineShapes(1).Line.Visible = msoFalse
 Selection.InlineShapes(1).LockAspectRatio = msoTrue
 Selection.InlineShapes(1).Height = 379.45
 Selection.InlineShapes(1).Width = 407.8
 Selection.InlineShapes(1).PictureFormat.Brightness = 0.5
 Selection.InlineShapes(1).PictureFormat.Contrast = 0.5
 Selection.InlineShapes(1).PictureFormat.ColorType = msoPictureAutomatic
 Selection.InlineShapes(1).PictureFormat.CropLeft = 0#
 Selection.InlineShapes(1).PictureFormat.CropRight = 0#
 Selection.InlineShapes(1).PictureFormat.CropTop = 0#
 Selection.InlineShapes(1).PictureFormat.CropBottom = 0#
 Selection.MoveRight Unit:=wdCharacter, Count:=1
 Selection.TypeParagraph
 Selection.TypeParagraph
 Selection.InsertBreak Type:=wdPageBreak
 
 Selection.InlineShapes.AddPicture FileName:= _
 "C:\WORK\SENC21\2004\matusima\EMF\W2.40.3.emf", LinkToFile:=False, _
 SaveWithDocument:=True
 Selection.TypeBackspace
 Selection.InlineShapes(1).Fill.Visible = msoFalse
 Selection.InlineShapes(1).Fill.Transparency = 0#
 Selection.InlineShapes(1).Line.Weight = 0.75
 Selection.InlineShapes(1).Line.Transparency = 0#
 Selection.InlineShapes(1).Line.Visible = msoFalse
 Selection.InlineShapes(1).LockAspectRatio = msoTrue
 Selection.InlineShapes(1).Height = 379.45
 Selection.InlineShapes(1).Width = 407.8
 Selection.InlineShapes(1).PictureFormat.Brightness = 0.5
 Selection.InlineShapes(1).PictureFormat.Contrast = 0.5
 Selection.InlineShapes(1).PictureFormat.ColorType = msoPictureAutomatic
 Selection.InlineShapes(1).PictureFormat.CropLeft = 0#
 Selection.InlineShapes(1).PictureFormat.CropRight = 0#
 Selection.InlineShapes(1).PictureFormat.CropTop = 0#
 Selection.InlineShapes(1).PictureFormat.CropBottom = 0#
 Selection.MoveRight Unit:=wdCharacter, Count:=1
 Selection.TypeParagraph
 Selection.TypeParagraph
 Selection.InsertBreak Type:=wdPageBreak
 
 Call myShapeBehindText2
 End Sub
 
 Sub myShapeBehindText2()
 'Dim my Shape As InlineShapes
 Dim myCmmdBar As CommandBars
 Dim myCtrl As CommandBarControl
 Dim i As Integer
 '
 
 Set myCmmdBar = ActiveDocument.CommandBars("Picture")
 Set myCtrl = myCmmBar.FindContro(ID:=1404)
 '
 For i = 0 To ActiveDocument.InlineShapes.Count - 1
 ActiveDocument.InlineShapes.Item(i).Select
 myCtrl.Controls(4).DescriptionText
 ' MsgBox myCtrl.Controls(4).DescripitionText '
 Next i
 'For Each myShape In ActiveDocument.InlineShapes
 'myShape.ZOrder msoSendBehindText
 'Set myCtrl = myCmmBar.FindControl(ID:=4000)
 'myCtrl.Execute
 'Next myShape
 
 End Sub
 
 *************************************
 
 |  |