vba - Copy Excel Cells and Paste into Word as an Image -


i'm trying capture image of range of cells. image can either saved, or pasted same excel document, pasted word document, etc. need generate images groups of cells.

i thought had figured out copying , pasting word this:

dim objword, objdoc object activewindow.view = xlnormalview range("a1:b45").select selection.copy set objword = createobject("word.application") set objdoc = objword.documents.add objword.visible = true objword.selection.pastespecial link:=false, datatype:=wdpastemetafilepicture, _     placement:=wdinline, displayasicon:=false objword.selection.typeparagraph 

when run this, seems work. object that's pasted in word spreadsheet object acts metafile. (so it's bringing data along embedded excel sheet).

any suggestions?

this appears work:

sub luxation()     dim objword, objdoc object     activewindow.view = xlnormalview     range("a1:b45").select     selection.copypicture appearance:=xlscreen, format:=xlpicture     set objword = createobject("word.application")     set objdoc = objword.documents.add     objword.visible = true     objword.selection.paste     objword.selection.typeparagraph end sub 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -