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 / November 2007

Tip: Looking for answers? Try searching our database.

Export Button

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
IJD - 27 Nov 2007 09:50 GMT
HI,

Totally newbie question but I just can't get the syntax right.

I am trying to export a form as a mht file with the name based on a field in
the form.

Can anyone advise where I am going wrong in the following code?

Thanks

Iain

{

var saveField

=XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:Cases/@Client_Name");

var name = saveField.text;

XDocument.SaveAs("C:\"&name&".mht");

}
evilgenius - 27 Nov 2007 12:44 GMT
I believe the problem is that in javascript\jscript the + character is
the concat character so try:

XDocument.SaveAs("C:\"+name+".mht");
Or
XDocument.SaveAs("C:\\"+name+".mht"); (I have had some issues with the
slash character)

eg

> HI,
>
[quoted text clipped - 20 lines]
>
> }
 
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.