VBAで良ければ、2007で動くかどうか不明です(当方2000)が、選択範囲をクリップボード経由で、emf形式で保存するコードです。
selectionToEMFfileを実行します。
保存後、Word2000の例では、挿入/図/ファイルからで、読み込めます。
Option Explicit
Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End Type
Private Type PICTDESC
cbSizeofstruct As Long
picType As Long
hEmf As Long
Padding(0 To 1) As Long
End Type
Const PICTYPE_ENHMETAFILE = 4
Private Declare Function OleCreatePictureIndirect Lib "olepro32.dll" (lpPictDesc As PICTDESC, riid As GUID, ByVal fOwn As Long, lplpvObj As Object) As Long
Private Declare Function OpenClipboard Lib "user32" (ByVal hWndNewOwner As Long) As Long
Private Declare Function CloseClipboard Lib "user32" () As Long
Private Declare Function GetClipboardData Lib "user32" (ByVal uFormat As Long) As Long
Const CF_ENHMETAFILE = 14
Private Declare Function CopyEnhMetaFile Lib "gdi32" Alias "CopyEnhMetaFileA" (ByVal hemfSrc As Long, ByVal lpszFile As String) As Long
Private Declare Function DeleteEnhMetaFile Lib "gdi32" (ByVal hEmf As Long) As Long
Sub selectionToEMFfile()
If TypeName(Selection) <> "Range" Then Exit Sub
Selection.Copy
SavePicture CreatePictureFromCB(), "c:\saveEmfTest.emf"
End Sub
'CreatePictureFromCB()は下記より
'http://www.moug.net/faq/viewtopic.php?t=34259
Private Function CreatePictureFromCB() As Object
'そのまま載せて良いか分かりかねますので、リンク先をご覧下さい。
End Function
お礼
vbaの意味は半分も解りませんが、コピペさせていただき、無事目的の動作ができそうです。とりあえずお礼申し上げます。