Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Worddoc from Excel via VBA - Paste
Hi Guys 'n Girls
in one of my Wordtemplates i have following lines: dim e as excel.application set e = excel. application these lines work perfectly, it opens excel and i can do the stuff that i want. No i want to go vice versa, i want to do same in Excel: dim w as word.application set w = word.application the reference to the word 10.0 Obj Library has been set and i'm ready to go...but excel isn't! if i try these lines, i get an activeX error! Only if i have opened Word already manually the code works. What am I doing wrong?? Any Help appreciated Carlo |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Worddoc from Excel via VBA - Paste
Dim WRDAPP, WRDDOC Set WRDAPP = CreateObject("Word.Application") Set WRDDOC = WRDAPP.Documents.Open("C:\TEST.DOC") 'Or for a new doc: 'Set WRDDOC = WRDAPP.Documents.Add WRDAPP.Visible = True 'WRDAPP.Quit "Carlo" schreef in bericht ... Hi Guys 'n Girls in one of my Wordtemplates i have following lines: dim e as excel.application set e = excel. application these lines work perfectly, it opens excel and i can do the stuff that i want. No i want to go vice versa, i want to do same in Excel: dim w as word.application set w = word.application the reference to the word 10.0 Obj Library has been set and i'm ready to go...but excel isn't! if i try these lines, i get an activeX error! Only if i have opened Word already manually the code works. What am I doing wrong?? Any Help appreciated Carlo |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Worddoc from Excel via VBA - Paste
Thanks moon
"moon" wrote: Dim WRDAPP, WRDDOC Set WRDAPP = CreateObject("Word.Application") Set WRDDOC = WRDAPP.Documents.Open("C:\TEST.DOC") 'Or for a new doc: 'Set WRDDOC = WRDAPP.Documents.Add WRDAPP.Visible = True 'WRDAPP.Quit "Carlo" schreef in bericht ... Hi Guys 'n Girls in one of my Wordtemplates i have following lines: dim e as excel.application set e = excel. application these lines work perfectly, it opens excel and i can do the stuff that i want. No i want to go vice versa, i want to do same in Excel: dim w as word.application set w = word.application the reference to the word 10.0 Obj Library has been set and i'm ready to go...but excel isn't! if i try these lines, i get an activeX error! Only if i have opened Word already manually the code works. What am I doing wrong?? Any Help appreciated Carlo |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy paste to first first open row | Excel Worksheet Functions | |||
can't paste in excel without having an open excel sheet! | Excel Discussion (Misc queries) | |||
open copy paste | Excel Programming | |||
Open file, copy field and paste into an Excel doc! - Pl help .. | Excel Programming | |||
Open file, Copy a column and paste this into a new Excel doc - Pl | Excel Programming |