Jump to content

Recommended Posts

Posted

Is there a way to just open the Excel program and not a specific file from within AutoCAD?

 

 

Thanks

Posted

Thanks, but I need to just open Excel as if I launched the Excel program from an icon. I don't want to open an already existing file.

Posted

(setq xls (vlax-create-object "excel.application"))
(vlax-put-property xls 'visible :vlax-true)

 

Be sure to release the xls object when finished.

Posted

It has something to do with the shell command. I haven't gotten it working, but I haven't put much time into figuring it out either. If I understand correctly, this other thread does what you're wanting, but I can't make it work with Excel some reason.

Posted

Simply:

(if (setq excel (vlax-get-or-create-object "Excel.Application"))
 (vlax-put-property excel 'visible :vlax-true)
 (prompt "\nUnable to interfere with excel application.")
)

Although you would have to release the excel application object in the end.

 

EDIT: Damn, Lee was faster - sorry. :ouch:

Posted

Actually, this is better:

(startapp (vl-registry-read (strcat "HKEY_CLASSES_ROOT\\" (vl-registry-read "HKEY_CLASSES_ROOT\\.xls") "\\shell\\new\\command")))

Posted
Actually, this is better:
(startapp (vl-registry-read (strcat "HKEY_CLASSES_ROOT\\" (vl-registry-read "HKEY_CLASSES_ROOT\\.xls") "\\shell\\new\\command")))

 

Learned something new today, you have my thanks! :)

Posted
Actually, this is better:
(startapp (vl-registry-read (strcat "HKEY_CLASSES_ROOT\\" (vl-registry-read "HKEY_CLASSES_ROOT\\.xls") "\\shell\\new\\command")))

 

 

 

:thumbsup:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...