Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to open Word from Excel with VBA (Office 2003)
Hi.
I'm trying to build a organization chart from data I have in a excel sheet. As I understand http://support.microsoft.com/default...b/317293/en-us I need to open Word to create the chart there and then copy'n'paste it to my excel file. When trying to run the demo code, Excel just aborts without as much as an error dialog. when debugging, I found out it only goes to the line Set oCurWorkApplObj = CreateObject("Word.Application") and then nothing happens. In debugging mode, it just restarts from the beginning after that line. Can anyone here give me a hint, what might go wrong or what I might do to find out what exactly goes wrong? Thanks in advance, Daniel |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to open Word from Excel with VBA (Office 2003)
try rebooting your system and trying it.
If word is registered and closed when you run the code, it should work. It is possible you have started multiple instances of word and they are taking up all your memory. You can use task manager to see before you reboot. -- Regards, Tom Ogilvy "Daniel Hohenberger" wrote: Hi. I'm trying to build a organization chart from data I have in a excel sheet. As I understand http://support.microsoft.com/default...b/317293/en-us I need to open Word to create the chart there and then copy'n'paste it to my excel file. When trying to run the demo code, Excel just aborts without as much as an error dialog. when debugging, I found out it only goes to the line Set oCurWorkApplObj = CreateObject("Word.Application") and then nothing happens. In debugging mode, it just restarts from the beginning after that line. Can anyone here give me a hint, what might go wrong or what I might do to find out what exactly goes wrong? Thanks in advance, Daniel |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to open Word from Excel with VBA (Office 2003)
Hi Tom,
thank you for the quick response. There were no Word instances running according to my task manager. I tried rebooting nonetheless, but to no avail. Word is closed, but I'm not sure what you mean by 'registered'. Do I need to do this somewhere in VBA? Need I declare the use of Word before using this sub? I'm sorry if this sounds stupid, I'm a total beginner with VBA, only used to Java and C. Regards, Daniel |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to open Word from Excel with VBA (Office 2003)
No, you shouldn't need to register it. If you want to check, go into the VBE
(alt+F11) and go to tools =References and see if Microsoft Word is listed there. If it is, then it is registered. In fact, create a reference to it. then in your code you can change Set oCurWorkApplObj = CreateObject("Word.Application") to Set oCurWorkApplObj = new word.Application http://word.mvps.org/FAQs/InterDev/E...ateBinding.htm -- Regards, Tom Ogilvy "Daniel Hohenberger" wrote: Hi Tom, thank you for the quick response. There were no Word instances running according to my task manager. I tried rebooting nonetheless, but to no avail. Word is closed, but I'm not sure what you mean by 'registered'. Do I need to do this somewhere in VBA? Need I declare the use of Word before using this sub? I'm sorry if this sounds stupid, I'm a total beginner with VBA, only used to Java and C. Regards, Daniel |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to open Word from Excel with VBA (Office 2003)
Just wondering if you looked in the task manager on the Application tab or did
you look for WINWORD.exe on the Processes tab? Daniel Hohenberger wrote: Hi Tom, thank you for the quick response. There were no Word instances running according to my task manager. I tried rebooting nonetheless, but to no avail. Word is closed, but I'm not sure what you mean by 'registered'. Do I need to do this somewhere in VBA? Need I declare the use of Word before using this sub? I'm sorry if this sounds stupid, I'm a total beginner with VBA, only used to Java and C. Regards, Daniel -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to open Word from Excel with VBA (Office 2003)
Thanks again,
that did the trick. Now onwards to actually getting the needed data from the xls and pretty colors ;) Daniel -- my homepage : http://hd42.de 'Life is wasted on the living' - Zaphod Beeblebrox the Fourth |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Still can't open excel 2007 with office 2003 | Excel Discussion (Misc queries) | |||
eula pops up every time i open an office program. office 2003 ins. | Excel Discussion (Misc queries) | |||
How to open Excel/Word/PP file in office 2003 by default? | Excel Discussion (Misc queries) | |||
office 2003 eula comes up each time you open word,excel | New Users to Excel | |||
In office 2003 how can FIXEDSYS font avail in EXCEL & not in WORD | Excel Discussion (Misc queries) |