Solved: Paste special from Excel to Word
Hi,
How do you paste special something from Excel to word.
I tried the following and it doesn't work
[vba]
Dim oWord As Object
Dim oDoc As Object
Set oWord = CreateObject("Word.Application")
MyFile = InputBox("Please copy and paste the file path that contains the word file for this project.)
Set oDoc = oWord.Documents.Open(MyFile)
Sheets("UnderstandingChart").Select
Range("A2").Select
Dim rngT4 As Range
Dim rngD4 As Range
Dim rngTD4 As Range
Set rngT4 = Selection
ActiveCell.Offset(7, 16).Select
Set rngD4 = Selection
Set rngTD4 = Range(rngT4, rngD4)
Range("C1").Select
oDoc.Bookmarks("UnderstandingChart").Range.Select
Worksheets("UnderstandingChart").Range(rngT4, rngD4).CopyPicture xlScreen, xlBitmap
oWord.Selection.PasteAndFormat Type:=3 'This is for wdPasteMetafilePicture
[/vba]
When I do that I get a 5342 error saying data type unavailable.
If I use wdPasteMetafilePicture instead of 3 the copy is blurry.
If even tried
[vba]
...
oDoc.Bookmarks("UnderstandingChart").Range.Select
rngTD4.copy
oWord.Selection.PasteAndFormat Type:=3 'This is for wdPasteMetafilePicture
[/vba]
:help