Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I open a program(CADD) with VBA

I'm nearly done with my drawing index and it was brought up that i
would be nice to have the program once it found a drawing have th
option to open it in Bentley Microstation(Our CADD program)

I figured out how to open the program(via the executable), but I ca
not figure out how to open just a specific drawing(aka file
"drawingnumber.dgn") automatically.

The drawings will all be stored in the same directory on our network s
navigation through folders is not needed.

Basically need to know how to simulate the command a double click on
drawing runs. Choosing microstation as the program with which to ope
the file.

Thank you in advance,

Bryan M

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I open a program(CADD) with VBA

I think that one should be simple:

First you need to find out how to open the program (Microstation) wit
a specific drawing from command prompt, usually by supplying the pat
name of the file as an argument to the executable will do it.

If you don't know you can find out by going in Control Panel/Folde
Options (For windows 2000 and XP)

Go to the "Folder Options" Tab and look for DNG, select it and click o
advanced and find the "Open" action

Select "Open" and click on edit and look in the field "Application use
to perform action"

Then just use the Shell function in Excel.

For example let's say that the executable is i
C:\Temp\microstation.exe, the drawing is in R:\Temp\Drw.dng and indee
it is just to supply the filename to open it. Then you can just run:

Shell ("C:\Temp\microstation.exe R:\Temp\Drw.dng")


To open with this specific drawing.


Hope this helps, let me know if you have problems and I'll try helpin
if I can.

Best Regards

Noo

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I open a program(CADD) with VBA

works great
just changed it a bit to

shell("c:\WIN32APP\ustation\ustation.exe c:\WIN32APP\ustation\out\dgn\
& drawingtoopen & ".dgn")

the c drive in the filepath is just temporary because I don't have th
drawings uploaded to the server yet. (I didn't know you just had t
pass the pathname after the executable)

Thank you for your help, it is much appreciated

--
Message posted from http://www.ExcelForum.com

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
Open a program from a Hyperlink? stew Excel Discussion (Misc queries) 3 December 9th 08 12:18 PM
I cant open files unless I open the Excel program first ElaineAng Excel Discussion (Misc queries) 3 February 16th 06 02:54 PM
Open another program sing VBA Rob Excel Discussion (Misc queries) 10 March 29th 05 11:09 AM
can't open 2 excel program a once tim Excel Worksheet Functions 2 February 22nd 05 02:49 AM
Open external program bondy Excel Programming 1 October 22nd 03 01:57 PM


All times are GMT +1. The time now is 12:12 PM.

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"