![]() | |
Last updated: before December, 1998
This is a small sample of OLE automation between Approach and Word. It copies the current view, intitializes a new
instance of the installed version of word and pastes a picture of the approach view. More sophisticated automation, including
transfer of formated text is avaiable for a fee. Paste this sub directly into the global area of your application. Create a new
marco, choose the run command and select this sub. Switch to the desired view and run the macro.
Submitted by Jerry Sikes (Jacksonville Converting) SikesJ01@unisourcelink.com
Sub Sub1
Dim wApp As Variant
Dim doc As Variant
Dim r As Variant
CurrentWindow.SelectAll
rval = currentwindow.CopyView($aprCurrentView)
Set wApp = CreateObject("Word.application")
wApp.Application.Visible = True
Set doc = wApp.documents.Add()
'wApp.Selection.TypeText "add some text"
wApp.Selection.Paste
End Sub