Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Still can't open excel 2007 with office 2003 richor Excel Discussion (Misc queries) 7 April 15th 10 04:40 PM
eula pops up every time i open an office program. office 2003 ins. ijscholl Excel Discussion (Misc queries) 0 July 28th 09 11:54 PM
How to open Excel/Word/PP file in office 2003 by default? Kashif Excel Discussion (Misc queries) 2 December 15th 08 03:13 PM
office 2003 eula comes up each time you open word,excel xpressmode New Users to Excel 0 September 5th 07 03:58 AM
In office 2003 how can FIXEDSYS font avail in EXCEL & not in WORD PTK Excel Discussion (Misc queries) 2 May 10th 06 05:39 AM


All times are GMT +1. The time now is 02:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"