Hello, I'm new to programming infopath solutions. I have a form field that (by formula) builds a network directory path. I have a button and OnClick event that should take the string value of the directory path field, create the directory and then open it so the user can drag and drop supporting documents to the new folder. The string path is maintainded (along with all other fields) in an access database so that another group can review the documents. I have started on the code behind the button but am very new to Infopath. Any advice would be helpful but I need help understanding how to pass the form field as string value into my createobject and then open the created file path (was thinking about a do command for this part)?
Sub CTRL113_7_OnClick(eventObj)
var oField1 = eventObj.Source.selectSingleNode("my:@File_Path3");
oField1.text = strFolder;
set objFSO = createobject("Scripting.FileSystemObject")
if objFSO.FolderExists(strFolder) = False then
objFSO.CreateFolder strFolder
MsgBox("Folder was created")
else
MsgBox("Folder was not created")
end if
End Sub