Macro Help. Copying Text From Draw to Word

I'm having trouble finding information on how to control Microsoft Word with CorelDraw macros. I'm trying to create a Macro that can copy text from CorelDraw into Word. Ideally it will paste this text into text boxes while retaining as much formatting as possible. 

I'm using X4. The initial part of the script I've written finds text objects in Draw that contain a certain word. All the text within these text objects needs to be copied. The formatting (bold, italics, size, leading) may vary throughout the text range. Retaining the formatting may be complicated but if someone knows a way to copy the text into Word text boxes it will be a good start.

Thanks for any help.

Parents
  • Right now I can get the following code to work from CorelDraw:

    Sub WordPlay()


    Dim i As Integer
    Set wrdApp = CreateObject("Word.Application")
    wrdApp.Visible = True
    Set wrdDoc = wrdApp.Documents.Add ' create a new document


    With wrdDoc
    Dim Box As Shape
    For i = 1 To 2
    .Content.InsertAfter "Here is a example test line #" & i
    .Content.InsertParagraphAfter
    Next i
    End With

    End Sub

    Does anyone know how I can get the sample text into text boxes? 

    Thanks in advance.

Reply Children
No Data