???? Windows SharePoint ?????? ???????? ????????? ?? ??? ??? InfoPath ??????? ?? ????? ???? ?? ??? ???? ????

???? ?????? ???? ??????
???? ID: 826993 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

?????

??? ?????? ??? Microsoft Office InfoPath 2003 ??, ?? ???? ????? ??????? ???? ?? ???? Microsoft Windows SharePoint ?????? ???????? ????????? ?? ??? ????? This article describes how to design a form template that uses script to submit form data to a Windows SharePoint Services document library. In InfoPath 2003, Service Pack 1 (SP1) and later versions of InfoPath, you can submit the form data to a Windows SharePoint Services document library directly by using the UI. This article contains the steps that you have to use to do this.

???? ???????

Design your form data source and layout in InfoPath 2003

  1. InfoPath ??????? ????? Design a new blank form.
  2. ????????? ?????task pane, add a data source to your form. ??? ???? ?? ???, ????? ????? ?? ???? ????::
    1. ????-????? ????myFields?? ????-????? ????, ?? ???? ???add.

      TheAdd Field or Group????? ?????,.
    2. ??????:FirstName?????, ?? ???? ??? ?? ??? ???OK.
    3. A. ?????? ??? ?? ???????MiddleInitial?????, ?? ???? ??? ?? ??? ???OK.
    4. A. ?????? ??? ?? ???????LastName?????, ?? ???? ??? ?? ??? ???OK.
  3. addmyFields???? ?? ??? ???? ????????
  4. ????? ????,???????? ?? ??? ???.

??????? ???? ????? ?? ????? InfoPath 2007 ??? ???????

  1. InfoPath 2007 ?? ??????? ?????
  2. ????? ????,???? ??????? ???????? ???????????? ????,blank?? ????-????? ????, ?? ???? ???OK.
  3. ???????????? ???????? ?? ???, ????? ???????? ?????.
  4. ????-????? ????myFields?? ????-????? ????, ?? ???? ???add.
  5. ?????????? ?? ???? ?? ???????????, ??????FirstName?????, ?? ???? ??? ?? ??? ???OK.
  6. ?????????? ?? ???? ?? ???????????, ??????MiddleInitial?????, ?? ???? ??? ?? ??? ???OK.
  7. ?????????? ?? ???? ?? ???????????, ??????LastName?????, ?? ???? ??? ?? ??? ???OK.
  8. ?????myFields??????? ?? ???????? ????, ?? ???? ???????? ?????? ??? ????????.

??????? ???? ????? ?? ????? InfoPath 2010 ??? ???????

  1. InfoPath 2010 ??????? ?????
  2. ??????????? ??????? ????????????? ????,blank?? ????-????? ????, ?? ???? ????? ??????? ?????? ????.
  3. ??? ???? ?? ?????????? ???????? ?? ???, ????? ???????? ?????.
  4. ??? ???? ?? ?????????? ??? ????????? ???? ?? ???, ???? ???????:??? ??,????? ??????.
  5. ?????????? ?? ???? ?? ???????????, ??????FirstName?????, ?? ???? ??? ?? ??? ???OK.
  6. ???? ???? ????? ??? ?????? ?????????? ?? ???? ?? ???????????, ??????MiddleInitial?????, ?? ???? ??? ?? ??? ???OK.
  7. ???? ???? ????? ??? ?????? ?????Add Field or Groupwindow, typeLastNameas the name of the field, and then clickOK.
  8. ?????myFieldsgroup to the form.

Submit the form data to a SharePoint Services document library

You can use script or the UI to submit the form data to the SharePoint Services document library.

Use script to submit the form data to a SharePoint Services document library in InfoPath 2003

  1. ????? ????????????? ??,Submitting Forms.

    TheSubmitting Forms????? ?????,.
  2. ?????Submitting Forms????? ????? ???, ????? ????Enable Submit.
  3. ?????????? ????????? ???, ????? ????Submit Using Custom Script.
  4. ????? ????,Open Microsoft Script Editor?? ????-????? ????, ?? ???? ???OK.

    Microsoft Script Editor starts.
  5. ??????? ????OnSubmitRequest????? follows ?? ??? ??? ???

    ???:You must change the value of thestrURLvariable to a valid URL in the code. The URL in the following code sample references a server that is namedServername, a SharePoint site that is namedSiteName, and a document library that is namedDocumentLibraryName.
    function XDocument::OnSubmitRequest(eventObj)
    {
        // If the submit operation is successful, set
        // eventObj.ReturnStatus = true.
        var fSuccessful = false;
     
        // Set the URL of the file that you want to submit here.
        var strUrl = "http://ServerName/SiteName/DocumentLibraryName/testform.xml";
     
        try 
        { 
            // Create an xmlhttp object.
            var oXmlHttp = new ActiveXObject("MSXML2.XMLHTTP");
     
            // See whether the document with the same name already exists in the Windows SharePoint Services (WSS) document library.
            oXmlHttp.Open("HEAD", strUrl, false); 
            oXmlHttp.Send(); 
     
            //  No document with the URL has been found. Continue to submit.
            // If you must replace the original file, you must call
            // oXmlHttp.Open("DELETE", strUrl, false) to delete the document 
            // in the WSS document library.
            if (oXmlHttp.Status == 404) 
            {
                // Put the document in the WSS document library. 
                oXmlHttp.Open("PUT", strUrl, false); 
                oXmlHttp.Send(XDocument.DOM.xml);
     
                //  A 200 status code or a 201 status code indicates that the form has been submitted successfully.
                if (oXmlHttp.Status == 200 || oXmlHttp.Status == 201)
                {
                    fSuccessful = true;
                }
            }
        } 
        catch (ex){} 
        
        if (fSuccessful)
        {
            XDocument.UI.Alert("Document submitted successfully."); 
            eventObj.ReturnStatus = true;
        }
        else
        {
            eventObj.ReturnStatus = false;
        }
    }
    
  6. Save the script. Close Script Editor.
  7. ???? ??????? ???????? ?? ?? ??? ??? ??????SubmitToWSS.xsn.

Use the UI to submit the form data to a SharePoint Services document library in InfoPath 2003 Service Pack 1

  1. ????? ????????????? ??,Submitting Forms.

    TheSubmitting Forms????? ?????,.
  2. ?????Submitting Forms????? ????? ???, ????? ????Enable Submit commands and buttons.
  3. ?????Submit to??????, ????? ????SharePoint form library.
  4. ?????Submitting Forms????? ????? ???, ????? ????add.

    TheData Connection Wizardstarts.
  5. Input your SharePoint Services form library link in theSharePoint form library????? ????

    Your library link may look similar to the following:

    http://ServerName/SiteName/DocumentLibraryName
  6. Type the document name in the????? ???????? ????

    You can use a document name such as TestForm.

    ????? ????,next.
  7. ?????Data Connection Wizard, click??????.
  8. ?????Submitting Forms????? ????? ???, ????? ????OK.
  9. Save your form template as "SubmitToWSS.xsn."

Use the UI to submit the form data to a SharePoint Services document library in InfoPath 2007

  1. ????? ????????????? ??,Submit Options.

    TheSubmit Options????? ?????,.
  2. ?????Submit Options????? ????? ???, ????? ????Allow users to submit this form.
  3. ?? ??? ???? ?? ??? ????? ????Send form data to a single destination??? ?????.
  4. In the drop-down list, clickSharePoint Document Library.
  5. ?????Submit Options????? ????? ???, ????? ????add.

    TheData Connection Wizardstarts.
  6. Type your SharePoint document library link in the???????? ?????????????? ????

    Your document library link may resemble the following:
    http://ServerName/SiteName/DocumentLibraryName
  7. Type the document name in the????? ???????? ????

    You can use a document name such as TestForm.
  8. ????? ????,next.
  9. ?????Enter a name for this data connectionbox, type a name for this data connection.
  10. In the Data Connection Wizard, click??????.
  11. ?????Submit Options????? ????? ???, ????? ????OK.
  12. Save your form template as SubmitToWSS2007.xsn.

Use the UI to submit the form data to a SharePoint Services document library in InfoPath 2010

  1. ????? ????????:??? ??,Submit Options.

    TheSubmit Options????? ?????,.
  2. ?????Submit Options????? ????? ???, ????? ????Allow users to submit this form.
  3. ?? ??? ???? ?? ??? ????? ????Send form data to a single destination??? ?????.
  4. In the drop-down list, clickSharePoint Document Library.
  5. ?????Submit Options????? ????? ???, ????? ????add.

    TheData Connection Wizardstarts.
  6. Type your SharePoint document library link in the???????? ?????????????? ????

    Your document library link may resemble the following:
    http://ServerName/SiteName/DocumentLibraryName
  7. Type the document name in the????? ???????? ????

    ?? TestForm ???? ???? ???????? ?? ??? ?? ????? ?? ???? ????
  8. ????? ????,next.
  9. ??????? ???? ??????? ?? ??? ??? ??? ???? ????????? ???, ?? ???? ??????? ?? ??? ??? ??? ??????
  10. ???? ??????? ??????? ??? ????? ??????????.
  11. ??????????? ????? ????????? ????? ???, ????? ????OK.
  12. ???? ??????? ???????? ?? SubmitToWSS2010.xsn ?? ??? ??? ???????

???? ??????? InfoPath 2003 ??? ??????? ????

  1. ????? ???????????? ??,???? ?? ??????? ????.
  2. ????????? ?? ??????? ??????? ????? ???? ????? ????SubmitToWSS.
  3. ??????? ?? ???? ?????
  4. ????? ???????????? ??,????? ????.

    ??? ??????? ??????????? ????? ???? ??? ??, ?? ???? ?? ????? ?? ?? ?? ????? ???? ???
  5. InfoPath ?? ???? ??????? ??? ?? ??????? ?? ???? ?????????? ?? ?????? ?? ??? ??? ???, ?? ????? ????????.
  6. Microsoft Internet Explorer ?? ??????? ????.. ???? ???????? ??????? ????????? ?? ?????? ??????

    ?????? ?? ???, ???? ???????? ??????? ????????? http://ServerName/SiteName/DocumentLibraryName ?? ???? ???

    ??? ??? ???? ???testform???????? ????????? ??? ???
  7. ????? ????,testform.

    ??????? ?? ????? ???? ???? InfoPath 2003 ??? ????? ???

InfoPath 2007 ??? ???? ??????? ?? ??????? ????

  1. ????? ???????????? ??,???? ?? ??????? ????.
  2. ????????? ?? ??????? ??????? ????? ???? ????? ????SubmitToWSS2007.
  3. ??????? ?? ???? ?????
  4. ????? ???????????? ??,????? ????.

    ??? ??????? ??????????? ????? ???? ??? ??, ?? ???? ?? ????? ?? ?? ?? ????? ???? ???
  5. InfoPath ?? ???? ??????? ??? ?? ??????? ?? ???? ?????????? ?? ?????? ?? ??? ??? ???, ?? ????? ????????.
  6. Windows Internet Explorer ?? ??????? ????? ???? ???????? ??????? ????????? ?? ?????? ??????

    ?????? ?? ???, ???? ???????? ??????? ????????? http:// ?? ???? ??Servername/SiteName/DocumentLibraryName.

    ??? ??? ???? ???testform???????? ????????? ??? ???
  7. ????? ????,testform.

    InfoPath 2007 ??? ??????? ?? ????? ???? ???? ????? ???

???? ??????? InfoPath 2010 ??? ??????? ????

  1. InfoPath Filler 2010 ??????? ????
  2. ????? ????,???? ??????? ??????.
  3. ??????SubmitToWSS2010.xsn, ???? ??? ????, ?? ???? ??? ????? ?????????.
  4. ??????? ?? ???? ?????
  5. ????? ???????????? ??,????? ????.

    ??? ??????? ??????????? ????? ???? ??? ??, ?? ???? ?? ????? ?? ?? ?? ????? ???? ???
  6. InfoPath Filler ?? ???? ??????? ??? ?? ??????? ?? ???? ?????????? ?? ?????? ?? ??? ??? ???, ?? ????? ????? ??????.
  7. Windows Internet Explorer ?? ??????? ????? ???? ?????? ?? ?? ??? "????? ??? InfoPath 2010. SharePoint ?????? ???????? ????????? ?? ??? ??????? ???? ????? ???? ?? ??? UI" ?? 6 ??? ?? ???????? ????????? ?????

    ???????? ????????? ??? ?? ??? ??????? ???? ????? ????, ?? ???? ??? ??? ????? ????????? ??????? ??????????
  8. ??? ??????? ???? ????? ?????

    ??????? ?? ????? ???? ???? InfoPath 2010 ??? ????? ???

??????

Microsoft Office ?? ??? ?????? ?????? ??? ?? ??????? ???? ?? ??? ???? ???? ?? ???? ??? ???? ??????? ?? ??? Microsoft ???????? ??? ???? ????? ?? ??? ????? ???? ?????? ?? ????? ????:
870924Office 2003 ?? ??? ?????? ?????? ??? ?? ??????? ???? ?? ??? ???? ????
InfoPath 2003 ??????? ?? ??? ????????? ?? ???? ???? ?? ???? ??? ???? ??????? ?? ??? ?????? ?? Microsoft ???????? ??? ????? ?? ??? ????? ???? ???????? ?? ????? ????:
828853???? InfoPath ??????? ?? ??? ????????? ???? ?? ????? ?? ??? ???? ????
827002???? Microsoft Office InfoPath 2003 ??????? ?? ??? ??? ????????? ?? ???? ???? ?? ??? ???? ????

???

???? ID: 826993 - ????? ???????: 05 ?????? 2010 - ??????: 3.0
???? ???? ???? ??:
  • Microsoft Office InfoPath 2007
  • Microsoft Office InfoPath 2003
  • Microsoft Windows SharePoint Services 2.0
  • Microsoft Infopath 2010
??????: 
kbhowto kbxml kbscript kbforms kbmt KB826993 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:826993

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com