Link to home
Start Free TrialLog in
Avatar of Joe Brown
Joe Brown

asked on

How can I get a value to return in a VB Script so it will be part of the file path name

Please see below document which is a screen shot. I would like for the ML_LOTSERIALNO$ to return the value to the file path where I have noted 'value'. How can I write the script so that it wit will do this?
Doc3.doc
Avatar of prashanthd
prashanthd
Flag of India image

Could you specify more details and complete requirements

regards
Prashanth
ASKER CERTIFIED SOLUTION
Avatar of Alan_White
Alan_White
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Joe Brown
Joe Brown

ASKER

I hava tried this and I get an error on script line #27

  27 : objShell.ShellExecute("M:\Quality Logs\Quality Logs\Master-CofA File\" & ML_LOTSERIALNO$ & ".pdf")

I attached a screen shot of the error I received
Doc2.doc
I removed the $ from the field name and it worked! :) This is the final code that I used.
Thank you!

' Use ShellExecute to open a particular file
Set objShell = CreateObject("Shell.Application")

objShell.ShellExecute( "M:\Quality Logs\Quality Logs\Master-CofA File\" & ML_LOTSERIALNO & ".pdf" )