Having problems with this and couldn't find a solution online that was more specific to what I am having trouble with.
I have an expression like this
pictureFolderFullPath = "C:\Work"
'Create Script Control Obj
Dim sc As ScriptControl
Set sc = CreateObject("ScriptControl")
sc.Language = "VBScript"
Dim content As String
content = sc.Eval("pictureFolderFullPath & "\3.jpg"")
Then, the content becomes only "\3.jpg", instead of having the full path of the picture
Makes run-time functionality available to a scripting engine.
Syntax
The AddObject method has these parts:
Part Description
Remarks
Use the AddObject method to make run-time functionality available to a scripting engine. The AddObject method enables a ScriptControl user to provide a set of name/object pairs to the scripting code. The scripting engines may expose the name in any way. In both VBScript and JScript, each name appears as a globally accessible name.