Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / February 2006

Tip: Looking for answers? Try searching our database.

how to change the default form name (Form1) when saving?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Francesco - 17 Feb 2006 08:01 GMT
Anybody can give me some indications about the code I need in order to have
the default "Form1" changed into another text (for instance NameSurname) when
saving the Form?

I have the following code for the OnSaveRequest, but how can I get the form
default name?

function XDocument::OnSaveRequest(eventObj)
{
    // Write the code to be run before saving here.
    eventObj.IsCancelled = eventObj.PerformSaveOperation();

    // Write the code to be run after saving here.
    eventObj.ReturnStatus = true;
}

Thanks in advanced.
Francesco
Gaurav Bhardwaj - 17 Feb 2006 09:44 GMT
Hi,

You can save the form with the following code:-
XDocument..SaveAs(Path);   //but the form shoud be full trusted

You can get the default form name by :-
XDocument.URI;

Is this what you are trying to ask ?

Thanks,
Gaurav

> Anybody can give me some indications about the code I need in order to have
> the default "Form1" changed into another text (for instance NameSurname) when
[quoted text clipped - 14 lines]
> Thanks in advanced.
> Francesco
Francesco - 17 Feb 2006 10:48 GMT
thanks for the reply.
So my question is : how can I overwrite the default XDocument.URI with
another text like "2006-02-15" ?

> Hi,
>
[quoted text clipped - 8 lines]
> Thanks,
> Gaurav
Francesco - 17 Feb 2006 11:01 GMT
I am trying to chang the name with some code like
XDocument.SaveAs("C:\MyForm.xml");
but I get an error

Is it correct what I am doing?
Francesco - 17 Feb 2006 11:43 GMT
ok, probably this error is due to the security level of the form...
I' ll try to install the form with Windows installer

> I am trying to chang the name with some code like
> XDocument.SaveAs("C:\MyForm.xml");
> but I get an error
>
> Is it correct what I am doing?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.