Excel to Word -> VBA -> Canvas?

pop3k

New Member
Joined
Jul 2, 2019
Messages
2
Im trying to drawing some lines, shapes in Word doc from Excel.
Can i do that? Is it some tool like Canvas?

Im connectiong with Word like below:
Code:
Sub ExcelWord()

Set wrdApp = GetObject(, "Word.Application")
Set wrdDoc = wrdApp.ActiveDocument
       
With wrdDoc

'code here

End With


Set wrdDoc = Nothing
Set wrdApp = Nothing


End Sub
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
You use VBA to add the lines and shapes, you don't need any external tools.

Are the shapes already in Excel? if so you copy and paste them
e.g.
Code:
    Sheets("MySheet").Shapes("Shape 1").Copy
    wordSelection.PasteSpecial Link:=False, DataType:=wdPasteShape, Placement:=wdInLine, DisplayAsIcon:=False

However ... Word is, tbh, a right pain in the proverbial. You need to insert bookmarks into your Word doc wherever you want stuff pasted or pick specific paragraphs. Working with page and line numbers is tricky to say the least, as Word treats page numbers as a function of printing so aren't easily accessible.

That's not very helpful, I appreciate, but I've wasted days trying to get stuff to copy between Excel and Word. And given up in the end.

If you have the option, it's far easier to work with PowerPoint than Word as you can pick specific slides and code where you want things pasted.
 
Last edited:
Upvote 0
No, i havent shapes already in Excel, i want to draw it to Word from Excel code :) I through make it in some application like Canvas.
Thanks anyway
 
Upvote 0

Forum statistics

Threads
1,223,676
Messages
6,173,764
Members
452,534
Latest member
autodiscreet

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top