''  This file downloaded from www.EdHarriss.com
''  
''  www.EdHarriss.com File Information:
''  
''    Script Name: LM_ApplySynoptic.vbs v1.5
''    Author: Ludovick William Michaud
''    Update/Change this file at by sending e-mail to EdHarriss@EdHarriss.com
''


set lst = GetValue("SelectionList")
siAddProp "Synoptic Property", lst,,,osynop
SetValue osynop & ".path", gSelectFile 

OpenAttachments lst

Function gSelectFile ()

dim oFileBrowser  
set oFileBrowser = XSIUIToolkit.FileBrowser  
 
oFileBrowser.DialogTitle = "Select a htm - Synoptic file"' set the title of the file browser  
oFileBrowser.InitialDirectory = "c:\"' set the initial directory  
oFileBrowser.FileBaseName = "*.htm"' set the default file name  
oFileBrowser.Filter = "Synoptic Files (*.htm)|*.htm||"' set the filters  
oFileBrowser.ShowOpen' show an open file dialog  

if err.number <> 0 then
	logmessage "You haven't selected a file", 4
	deleteobj osynop
	exit function
else
	if len(oFileBrowser.filename) <> 0 then
		gSelectFile = oFileBrowser.FilePathName
	else
		logmessage "You haven't selected a file", 4
		deleteobj osynop
		exit function		
	end if
end if

end function