Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing a PARM to 'Shell' that has embeded blanks

Status
Not open for further replies.

koz

Programmer
Jan 12, 2000
31
US
I am trying to shell to Microsoft Word passing the Path & Document name as one string. Each one may or may not contain embeded blanks. These are documents related to items in an Access database and may reside anywhere.

Is there a better way than using 'Shell'? I like the 'Shell' approach because it minimizes code in my program.
 
This worked for me.
Shell """C:\Program Files\Accessories\Wordpad.exe"" """ & strFilename & """", vbNormalFocus
i.e in Run it would be
"C:\Program Files\Accessories\Wordpad.exe" "parms"
 
Thanks for your help John. Everything is working now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top