If your specifying the filename before saving, then set that value to a field. Otherwise, when the form is opened, you can get the filename from the XDocument.URI property.

Signature
Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
Visit InfoPathDev ( http://www.InfoPathDev.com )
Hasse - 17 Aug 2006 09:08 GMT
Thanks a lot Greg,
I used your solution with the XDocument.URI property and it works great.
Regards,
Hans
> If your specifying the filename before saving, then set that value to a field. Otherwise, when the form is opened, you can get the filename from the XDocument.URI property.
Greg Collins [InfoPath MVP] - 17 Aug 2006 18:09 GMT
Great. Glad to have helped out!

Signature
Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
Visit InfoPathDev ( http://www.InfoPathDev.com )