Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi,
im a newbie at excel programming, trying to link an excel cellrange with an existing word doc, via excel vbeditor. my code goes like this: sub paste1() dim a as object dim b as string b="c:\testvb1.doc" a.documents.open(b) sheets("sheet1").select selection.copy a.selection.pastespecial link:=true, datatype:=wdpasteOLEObject, placement:=wdinline, displayas icon:=false end sub usually i get to open testvb1.doc the first time i run the macro, but if i try to run it again, i get an error message "the sever is unavailable or can not be found. I also tried to use arithmetic values (placement:=0, datatype:=1), but the same problem occurs. Is it possible that after the first macro run, after i manually close testvb1.doc it stays active somehow in backround? Any code examples and suggestions would be valuable for me at this point regards leptakis apostolis |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why need to use Selection.PasteSpecial vs myRange.PasteSpecial | Excel Programming | |||
using an existing grid on word how do you add columns | New Users to Excel | |||
Opening an existing Word File from within Excel | Excel Programming | |||
Writing Data to a Existing Word Doc. | Excel Programming | |||
how do I transfer information from excel to an existing word document using a macro | Excel Programming |