エクセルで袋文字を作成してみます。

- テキストボックスで同じ文字を3つ重ねて作成
- 真ん中のテキストの輪郭を白で太さを大きくする
- 一番下のテキストの輪郭を黒で太さをさらに大きくする
- すべて選択してコピー&図として貼り付ける

この3つのテキストボックスを重ねています。
設定部分だけご紹介
Sub 袋文字設定()
With shp_最背面
With .TextFrame2.TextRange.Font.Line
.Visible = msoTrue '輪郭線を付ける
.Weight = 7 '輪郭線の太さ
.ForeColor.RGB = rgbBlack '黒
End With
End With
With shp_真ん中
With .TextFrame2.TextRange.Font.Line
.Visible = msoTrue '輪郭線を付ける
.Weight = 10 '輪郭線の太さ
.ForeColor.RGB = rgbWhite '白
End With
End With
With shp_最前面
With .TextFrame2.TextRange.Font.Line
.Visible = msoFalse '輪郭線無し
End With
End With
End Sub
図として貼り付けるコード
Sub 図として貼り付け()
'3つのシェイプを全て選択
shp_最背面.Select Replace:=False
shp_真ん中.Select Replace:=False
shp_最前面.Select Replace:=False
'図としてコピー
Selection.CopyPicture
'貼り付け
ActiveSheet.Paste
'元のテキストボックスを削除
shp_最背面.Delete
shp_真ん中.Delete
shp_最前面.Delete
End Sub
スポンサーリンク