I am making a tool in Visio to draw electronic designs. When finished, theses designs should then be copied to a word document for further write up and descriptions of designs. I am struggling with the VBA code in Visio to copy the Visio page into the word document. Preferably I would open an existing word template and copy the Visio design after a given Word HEADING or so but for now I have only managed to create a new empty word document but can't find a way to reference the word document.
Could anyone help me with how to paste the selected diagram into the word application please?
This the Visio code I am struggling with:
Public Sub CopyVsoPgToWord()
Dim objWord
Dim objDoc
Dim vsoPage As Visio.Page
Dim DocName As String
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add
ActiveWindow.SelectAll
Application.ActiveWindow.Selection.Copy
With objDoc
.Paste 'this doesnt work
'past the Visio diagram into word page 2
End With
End Sub