Code to save and launch spreadsheet Un-Secured

If working in an un-secured environment without Infor Document Management, the following code can be used. In this case, the report is saved to the \FsWebReports\tmp folder, just as a Webreport output would be:

'Save and Launch Report (Unsecured Scripting)
		dim newfilepath as string = FileLocation("WEBREPORTS", "SOURCE")
		newfilepath = Replace(newfilepath.ToUpper, "\SOURCE", "\tmp")
		newfilepath = newfilepath & "\" &  filename

		Dim xlFileInfo As New FileInfo(newfilepath)
		pkg.SaveAs(xlFileInfo)
		'	if attaching without IDM is required:  DocAddAttach("", "", doccode, newfilepath)

		ShellAPI(newfilepath)'***********************