Automatically Name form and submit it to network drive with a submit button - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Automatically Name form and submit it to network drive with a submit button

Last post 08-15-2012 06:08 AM by nsodmordex. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-15-2012 05:26 AM

    Automatically Name form and submit it to network drive with a submit button

    I am trying to set up an InfoPath template that will automatically name a form, and place it in a specific network folder. I was able to get this to work without using fields to name the file, but now that I am trying to use the fields I am getting an error that reads: 'Object Required: thisXDocument', File: script.vbs Line: 31. I have three fields that affect the name and placement of the file. The goal is to direct InfoPath to a folder, and then have it within that folder create a folder with the Product Name, and then another folder that would be the Product Number Revision - Serial Number. Then the file name would have the same title as that folder. Here is the code I wrote: Dim txtpart Dim txtrev Dim txtserial Dim txtPath Dim txtDash Dim txtSlash Dim txtext txtpart = thisXDocument.DOM.selectSingleNode("//my:myfields/my:PartNumber").text txtrev = thisXDocument.DOM.selectSingleNode("//my:myfields/my:Rev").text txtserial = thisXDocument.DOM.selectSingleNote("//my:myfields/my:SerialNumber").text txtPath = "\\seusefnpgra001\public\First Time Builds\" txtDash = "-" txtSlash = "\" txtext = ".xml" XDocument.SaveAs(txtPath & txtpart & txtSlash & txtpath & txtrev & txtDash & txtserial & txtSlash & txtpart & txtrev & txtDash & txtserial & txtext) Does anyone see what I am doing wrong? The form security has been set to full access.
  • 08-15-2012 05:57 AM In reply to

    Automatically Name form and submit it to network drive with a submit button

    Nevermind, I realized that I was using thisXDocument, but in the script I was using I actually needed to be using XDocument. I still have one error though, now when I click submit I receive an error that says make sure the disk is not full, write protected or damage. I have full access to the drive, and the security settings have already been changed on the form to grant it full access to the folder as well. Any suggestions?
  • 08-15-2012 06:08 AM In reply to

    Re: Automatically Name form and submit it to network drive with a submit button

    solved my own issues. Thanks
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.