Using a custom Save Button

L

Lee

Hi All, I have Infopath 2003 SP1, fully trusted form. I am using C# Managed
code. When the user fills out the form I want them to click my Save button
on the form and it will save the form back to the sharepoint library using a
file name that is based on a field in the form.

Here is what is happening.

In the code for my command button I have
thisXDocument.Save();

This calls the OnSaveRequest event, which then saves the form.

This works fine IF, the form has been saved once already using the menu or
tool bar save commands.

But if the form has just been opened then it will fail with the error "The
form does not have a file name."

I think this is because the URI is set to form1 I have tried using
thisXDocument.SaveAs(filepath&namehere); and that has not worked either, it
is unabled to get back to the sharepoint site.

Any one know how to do this?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top