1. You can create a memory stream via the CreateStreamOnHGlobal API function, e.g. in VB6:
Private Declare Function CreateStreamOnHGlobal Lib "ole32" (ByVal hGlobal As Long, ByVal fDeleteOnRelease As Long, ppstm As Any) As Long
Dim memStreamDisp As Object
CreateStreamOnHGlobal 0, 1, memStreamDisp
Dim memStream As olelib.IStream
fcx.SaveToStream memStreamDisp
Set memStream = memStreamDisp
memStream.Seek 0, 0
fcx.LoadFromStream memStreamDisp
olelib.IStream is from the first type-library by Eduardo Morcillo on this page:
http://www.mvps.org/emorcillo/en/code/vb6/index.shtml2. If you need to offset the items after pasting them, you can do that by iterating the selection lists and call MoveTo for boxes and set CtrlPtX/Y for arrows. The following seems to work, but I haven't tried it for all types of arrow property combinations:
Sub MoveAllSelected(dx As Integer, dy As Integer)
Dim b As box
Dim t As table
Dim a As arrow
For Each a In fcx.SelectedArrows
For i = 1 To a.CtrlPtCount - 2
a.CtrlPtX(i) = a.CtrlPtX(i) + dx
a.CtrlPtY(i) = a.CtrlPtY(i) + dy
a.Update
Next i
Next a
For Each b In fcx.SelectedBoxes
b.MoveTo b.left + dx, b.top + dy
Next b
For Each t In fcx.SelectedTables
t.MoveTo t.left + dx, t.top + dy
Next t
End Sub
I hope that helps,
Stoyan