For my case, I use the jscript to resolve the problem. See the coding below
function XDocument::OnSubmitRequest(eventObj)
{
//The acutal filepath
//XDocument.UI.Alert("Location " + XDocument.URI);
var filepath, filename;
filepath = XDocument.URI
//Get only the filename from Windows local drive
filename = filepath.substring(filepath.lastIndexOf("\\") + 1);
var strUrl = "YOUR SHAREPOINT ADDRESS"
var folderName = "SPECIFIC FOLDER"
var xnFolderName = folderName;
var xnLocation = strUrl;
//Get a reference to the submit data connection
var fc = XDocument.DataAdapters["Submit to SharePoint"];
//Modify the Submit connection URL we want to submit to by concatenating the
//xnLocation and xnFolderName values
fc.FolderURL = xnLocation + "/" + xnFolderName;
//Use Original filename rather than DataConnection filename
fc.FileName = filename;
//Execute the submit connection
try
{
fc.Submit();
eventObj.ReturnStatus = true;
}
catch(ex)
{
thisXDocument.UI.Alert("The following error has occured: " + ex.DetailedErrorMessage);
eventObj.ReturnStatus = false;
}
}
Thanks