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 / May 2006

Tip: Looking for answers? Try searching our database.

Change File Save As Name

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
D - 20 May 2006 20:52 GMT
I am trying to change the name given to a form when it is save from the
default "Form 1" to a field in my form.

I copied code that was posted on this site by Koen Alleman (thank you),
plugged in my forms file names, but the save name is still "Form1"

I entered this code by going through Form Options- Open and Save- Save using
Custom Code- Edit.

If there is anyone who can tell me what I have done wrong I would greatly
appreciate it.  Thank you!

Here is my code:
function XDocument::OnSaveRequest(eventObj)
{function XDocument::OnSaveRequest(eventObj)
{
var nodeselname =
XDocument.DOM.selectSingleNode("/my:Intro:my:Position/my:last_name_candidate").text
XDocument.UI.SetSaveAsDialogFileName(nodeselname);
XDocument.UI.SetSaveAsDialogLocation("C:\\temp\\");

eventObj.IsCancelled = eventObj.PerformSaveOperation();

XDocument.UI.Alert("Form saved");
   
eventObj.ReturnStatus = true;
}

    // Write the code to be run before saving here.
Kalyan Reddy - 22 May 2006 06:10 GMT
Hi D,

I hope the links below helps you

http://infopathdev.com/forums/topic.asp?TOPIC_ID=1890&SearchTerms=File,Save,as
http://infopathdev.com/forums/topic.asp?TOPIC_ID=2388&SearchTerms=File,Save,as

Signature

Kalyan Reddy
Visit http://www.autonomysystems.com

> I am trying to change the name given to a form when it is save from the
> default "Form 1" to a field in my form.
[quoted text clipped - 25 lines]
>
>     // Write the code to be run before saving here.
D - 23 May 2006 22:29 GMT
Thank you for your help.  I have yet another question.  I know this seems so
basic but I don't think I am getting it right.  How do I figure out what the
address (?) of the fieldI want to use to plug into the code.

I am trying to use a text box that is in a group that is in the data source.

Can you tell me the format.
Is it:
my::my:data source name/my:group name/my:field name

Thank you again!
-Denise

> Hi D,
>
[quoted text clipped - 32 lines]
> >
> >     // Write the code to be run before saving here.
 
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.