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 2006

Tip: Looking for answers? Try searching our database.

code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joel Allen - 01 Nov 2006 23:56 GMT
Hello,

I am not very familiar with java script, so I'm seeking a little help
please.

I want to create code that will make a folder on my compter.

e.g. Make this folder ---> C:\2006\a field value\

Thank you so much,
Joel
S.Y.M. Wong-A-Ton - 02 Nov 2006 07:03 GMT
Retrieve the value of your field with something like:

var fieldVal = XDocument.selectSingleNode("XPath_to_your_field").text;

Then create the folder using

var fs;
fs = new ActiveXObject("Scripting.FileSystemObject");
fs.CreateFolder("c:\\2006\\" + fieldVal);

---
S.Y.M. Wong-A-Ton

> Hello,
>
[quoted text clipped - 7 lines]
> Thank you so much,
> Joel
Joel Allen - 02 Nov 2006 22:53 GMT
Thank you!  That worked.  Can I please ask 2 more questions?

1- Why do you need \\ and not \ in the field path?, and
2- I'm trying to create code to go to the folder after I create it.  This is
what I have.  It's not working, can you help?

var objWeb

objWeb = CreateObject("InternetExplorer.Application");
objWeb.Navigate("C:\\test");
objWeb.Visible = True;

Thanks,
Joel

> Retrieve the value of your field with something like:
>
[quoted text clipped - 20 lines]
>> Thank you so much,
>> Joel
S.Y.M. Wong-A-Ton - 03 Nov 2006 22:51 GMT
\ is a special character in JScript and other languages like JScript, so you
have to escape it with another \ to let JScript know that you really mean "\"
as a string and not the special character.

Regarding your IE question, perhaps you may want to post it in the IE
newsgroup, because the problem is not really related to InfoPath, unless it's
a security issue you're having. You could also do a search on the Internet on
"automating internet explorer".
---
S.Y.M. Wong-A-Ton

> Thank you!  That worked.  Can I please ask 2 more questions?
>
[quoted text clipped - 35 lines]
> >> Thank you so much,
> >> Joel
 
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.