Launching SW Viewer From Command Line

Hi Folks,

I know there are some command line switches for running SW (/m for invoking a macro) but here is what I need to do. Since the SW Viewer has no type library for VBA (maybe I am wrong) instantiating the viewer form Excel is a little different than starting SW. My guess that one way to do it is to use a command line in shell command. I want to launch a file of a known name into SW Viewer. If I use this line in Excel VBA => Shell "C:\Program Files\SolidWorksViewer\swviewer.exe", vbNormalFocus i get a SW viewer icon on task bar but it won't open?

What I need to get is Excel to launch SW Viewer with a file handed in from VBA. Ideas?


Reply to
Guy Edkins
Loading thread data ...


Got it!!!!

Lots of correctly placed quotes does the trick using the Shell command.

Reply to
Guy Edkins

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.