Hi,
When loading a form from a saved XML, I want the user to start the default save location from the My Documents. I know this is the default behaviour when loading an XSN, but I also want this occur when loading an XML. By default, when I load an XML from the hard drive, or a submitted e-mail, it defaults the save location to where the XML was loaded.
I've recently noticed that you can override how the save occurs in InfoPath using the OnSaveRequest function.
However, I wanted to know the flexibility of it, when the form is not fully trusted.
I want the form to start the saveDialogLocation from the My Documents, but am not sure what to type.
I can't hard code the My Documents directory such as, XDocument.UI.SetSaveAsDialogLocation("C:\\USER Profile\My Documents"),
for 2 reasons:
1) I don't know what user is on.
2) The My Documents changes if there is a network connection or not.
I've noticed that if you write a directory that doesn't exists, such as XDocument.UI.SetSaveAsDialogLocation("z:\NotThere"), it automatically reroutes back to the My Documents, so I assume there should be a way to tell InfoPath to go to the My Documents, without placing a non-existant directory.
If I don't place anything inside the quotes, such as XDocument.UI.SetSaveAsDialogLocation(""), it defaults the save location to the area where the xml was loaded.
Is there a simple variable that I can use, that will always use the My Documents?
eg: XDocument.UI.SetSaveAsDialogLocation("\\MyDocuments") ?
As always,
any help would be appreciated.
- Reg