Exporting an Existing form as XML

I want to export an existing form (Item master form) as XML so I can make some changes to it and replace existing with my new one... but...
I have tried copying to file and to clip board
using following code but I cannot get the XML data
'To File
Dim oFile As System.IO.File
Dim oWrite As System.IO.StreamWriter
oWrite = oFile.CreateText("C:\" & pVal.FormUID & ".xml")
oWrite.Write(sboapp.Forms.GetForm(150, 1).GetAsXML)
oWrite.Close()
'and to ClipBoard
System.Windows.Forms.Clipboard.SetDataObject(sboapp.Forms.ActiveForm.GetAsXML, True)
but the copying to clipboard doesnt work at all and to file seems to loose formating (goes in as one big string which wont load as xml..
Any pointers would be appreciated...
thanks

Hello,
The following code should work
Dim dxl_XmlDoc As Xml.XmlDocument
Dim dst_XmlString As String
dxl_XmlDoc = New Xml.XmlDocument
dst_XmlString = sboapp.Forms.Item(pVal.FormUID).GetAsXML
dxl_XmlDoc.LoadXml(dst_XmlString)
dxl_XmlDoc.Save("C:tempfrm.xml")
HTH
Sebastien

Similar Messages

  • C# Example: Update existing form using XML

    I am searching for an C# example to manipulate existing forms using XML. The result I want to achieve is to add a button on the Item form (10003).

    It must be possible. Look for a discussing about this topic at Re: Update a system form with XML: empty screen when this is a target docum for example.
    The main steps are:
    1. Get XML system form
    2. Replace UID
    3. Update the system form using XML
    4. Load 'new' form.
    The problem is that I don't have a good example how to 'Get' and 'Load' the XML using C# in Visual Studio 2005. It is a little bit frustrating, because I can't get the whole picture...
    Do you still think it is better to load a new form instead of changing the original?

  • Form are different when save an exist form as XML then load from XML

    Hi everyone,
    Who have experience that save an exist form as XML file then load from XML, some controls position, size and color different with the source form.
    I want to use the system wizard form style and I saved system form MRP Wizard as XML file, when I load form from XML, the form shows picture with different position, size, the rectangle control lost color and position also different with source form, because I want to get the line color in the form, the separate line implement using rectangle, please share your opinion how to save the form as XML more Accurate.
    Thanks in advance!
    Kathy

    Hi Kathy
    After loading a form over XML, we made the experince that in matrices link buttons will not appear everwehere they should. It's a tricky part and we made a work around by changing the columns order and then...the Link Buttons came up ok.
    regards
    Kurt

  • Export PDF Form to XML through VBScript

    Hi,
    I was wondering if there is a way to automate the export of an Adobe PDF Form to XML, either using the Adobe SDK/AcroExch.App or the PDF Test Toolkit.
    I'm wanting to perform this action via a QuickTest Pro Script and thought there might be a funciton already written to perform this action, rather than having to automate the selection of Document>>Forms>>Export Data... from the Adobe Reader Menu and the Export Dialog.
    Any suggestions would be much appreciated
    Thanks in advanced,
    Ross

    Hi,
    Are you trying to edit the Adobe Test Toolkit ? If yes, I think it’s not easy to edit Adobe Test Toolkit. If you want to export PDF file to Microsoft XML file and Adobe is not working with you, than I will recommend you to try Classic PDF Editor which can easily export PDF files to Microsoft XML files. Classic PDF Editor also done many other type of file conversation like PDF to Doc, XML, PPT etc
    If Classic PDF Editor solve your problem, must come back share your important views about this software.
    Thanks

  • Urgent Issue: Error Mapping Existing Forms to manually updated XML

    Hi All,
    We are working on pretty complex InfoPath form which contains 150+ fields. Based on new requirements, we added few sections containing
    repeating tables with default data of multiple rows (using default values feature). To make sure that existing forms get these repeating table values correctly we wrote a PowerShell script to update the existing forms (xml files) directly.
    This is done so that when an existing form is opened data should get properly mapped. But unfortunately only few repeating tables are showing the correct data and other repeating tables are showing only first record multiple times. This is working for new
    forms exactly the way we expect.
    We tried to download the xml file and updating the changed xml section from new form xml but it still does not work and shows the same issue. But when we open the existing
    form, save it, download it and then change the xml with xml from new form, it works. Somehow when we open existing forms, the mapping is not correct.
    Please guide me on this issue. Appreciate your help.
    Please let me know if I need to provide more details.
    Thanks,
    Rahul Babar
    ASP.NET, C# 4.0, Sharepoint 2007/2010, Infopath 2007/2010 Developer http://sharepoint247.wordpress.com/

    Dear Rahul,
    The problem is very well clear, but in order to suggest in your solution I recommend to post the code you used in PowerShell to update xml, any XSLT customization, custom code related to the repeating table you have implemented etc.
    If you find this information as helpful please mark this as ANSWER or HELPFUL. Thanks

  • How to export only the form field data in an XFA form when data connection is used

    I have used xml data connection to populate the values in the dropdown. The data to be loaded into the DropDown is very large , So I have used data connection using xml scheme.
    Then I used export data functionality to export all fields in the form to xml.Insead of exporting all the fileds it just export the values of the dropdown which has been binded through Xml Schema.
    I am not having the licenced version of Adobe Life Cycle. Could you help me solving this issue ? I just want both the data binding and the export data functionality.
    Thanks & regards,
    Karthikeya

    If you could use the below command you can get all the field values from the form.
    xfa.data.saveXML("pretty");
    Thanks
    Srini

  • How to save XDP/Form with XML as a standalone PDF - Running out of time

    Help...I'm in a time crunch.  I have a perfectly working form that takes XML and merges into a wonderful PDF on my machine (1000+ pages).  The problem is I need to distribute the finished PDF with the XML...not to two independent files.
    I have tried every "Save As" and "Export" available and it only saves the PDF template without the data.
    I have tried to "Print" to a PDF writer / pseudo-printer but it chokes and dies after a few hundred pages.
    What am I missing?  How can I take this form and XML and make a final product PDF that I can distribute?
    In case it helps...the form was made in LiveCycle and the XML is generated from PHP.

    Thanks for your ideas.  I'm not using the reader...I'm using Acrobat Pro 9.x.
    This isn't really a LiveCycle question because that has to do with the form design.  This is post-design and during the data merge...something only an end-user would see or have access to.
    The form works great...the data is great.  They are merged on the screen and looks perfect.  However, I can't get the combined output saved anywhere.

  • SAPSCRIPT: Creating new Language for existing form

    Hi Guys,
    I need add an additional language for an existing form. Italian is not available for the this existing form. How can I add this language? do I need to copy the form with language EN? how can I include that form in the existing form? or there are other way to do this? Thanks in advance!
    Regards,
    Michael Nacionales

    There is a change in the standard code.The reason for the above problem was  because of a missing Enhancemnet point in a standard function module 'CV110_DOC_CREATE_WITH_TEMPLATE'.
    IS-ADEC-MPD  - Enhancement to copy MPD data
    ENHANCEMENT-POINT CV110_DOC_CREATE_WTEMPL_01 SPOTS ES_SAPLCV110.
    +*$*$-Start: CV110_DOC_CREATE_WTEMPL_01----------------------------------------------------------$*$*+
    +**ENHANCEMENT 1  ZSF_AD_MPD_SAPLCV110.    "active version**+
    +*** copy MPD relevant data from templ. doc to current doc**+
      +**CALL FUNCTION 'MPD02_COPY_MPD_DATA'**+
        +**EXPORTING**+
          +**is_draw = ls_draw**+
        +**TABLES**+
          +**ct_drad = lt_drad.**+
    +*ENDENHANCEMENT.**$*$-End:   CV110_DOC_CREATE_WTEMPL_01----------------------------------------------------------$*$*+
    Created a custom enhancement point similar to SAP ECC6.0 EHP 3.0 system.
    The reason was the buffer was not getting cleared previously.After inserting the above code the DIR's are getting created withot any issues.
    Regards,
    Prasad.B

  • Export data from forms to excel

    HI
    In my application im trying to export data from forms to excel.Everything works fine.First of all im using get_file_name for selecttion of file and passing it to ole2 package as follows
    FILENAME := GET_FILE_NAME(File_Filter=> 'XLS Files (*.xls)|*.xls|',dialog_type=>SAVE_FILE);
         ARGS:=OLE2.CREATE_ARGLIST;
         oLE2.ADD_ARG(ARGS,Filename);
         OLE2.INVOKE(WORKSHEET,'SAVEAS',ARGS);
    The problem is if i select an existing file the get_file_name itself raises one message ".....file already exists Replace an existing file?"
    Similarly the excel also also raises the same message "".....file already exists Replace an existing file?".I want to suppress atleast one of them? Could anyone help for this problem?
    appreciate ur help
    THANKS

    Looks like...
    ole2.set_property( ex_app, 'DisplayAlerts', false );
    where "ex_app" variable Excel Application -
         ex_app:=     ole2.create_obj('Excel.Application');
    and more Question:
    When i close excel app - in process viewer i see "excel.exe"
    ole2.release_obj don't work :(

  • Multiple List Box showing Duplicate Options in Existing Form Library forms.

    Good day.  I currently have an InfoPath 2010 form library template that has a view containing 4 multiple selection list boxes.  These list boxes get their values from a hidden view that contains 4 repeating tables in which I've set default values
    for Value and Display name to populate the multiple selection list boxes.
    The issue I am having is this: When adding new options to the repeating tables through the Default Values option window and publish, new forms display the new selection options successfully, while existing forms in the library when opened are displayed duplicates
    of the first default value in the table in the place of the new options. (Example, Create Data[display] - 10[value] is displaying 4 times after adding 3 new options to the characteristics table that contains Create Data as it's first row item.)
    When comparing the .XML of a new form to an existing form, groupX in this case shows all options in the new form .XML, but shows the duplicates in the .XML of an existing .XML file.
    Is there a way to resolve this issue so that existing documents will display the proper selection options instead of the duplicates?  I'd like to note that another list box had a value added and it displayed the value properly when published in both
    new and existing forms.
    Thanks!

    Hi Hemendra:
    There are no rules on Section A.
    Two out of three forms used so far by the users have these problems.
    We did extensive trending study on all the submitted forms on both where the submit was successful and ones with Section A frozen up. Also, requested a user to submit a few forms per our instructions on different browsers.  Even though there are some
    forms in the past which could be claimed as success has some attachment uploaded to the Section A of the form, currently every time an attempt by any usetr to attach a smallest document the section A, it wipes out all the existing completed fields and freezes
    up all the rest of the controls of that section and not any other part of the form.
    Thanks,
    SRA
    SRAEngineer

  • Problem Exporting / Importing print forms with program RSTXSCRP

    Hi!
    there is problem Exporting / Importing print forms with program RSTXSCRP.
    when I transfer print form from one SAP system to other, logo image and some text is missing... what could be the reason?
    Maybe there is other way to transfer print forms between SAP systems without using program RSTXSCRP?
    Will reward,
    Mindaugas

    Hi,
    when you transfer print forms from one sap system to another, logos are not transfered automatically. these are actually .bmp files which need to be existing in every client. then only when you run your print program logo can be seen in your print output. hence logos need to be created explicitly in every client where you want to run your print program.
    thanks,
    sksingh

  • UI: Save system form as xml

    Hi,
    I tried to export a system form like the delivery note form to a XML document, but it doesn't work.
    For the forms I created with the Screen Painter it works without problems. I can run an import or export and I always receive an XML document.
    For the system forms I didn't get a XML file at all.
    Are there any code examples or help files that could help me with this export?
    I already searched the forum for this topic but I can't find one that answers my question.
    Perhaps someone can help me solving this problem.
    Regards,
    Dennis

    > Are there any code examples or help files that could
    > help me with this export?
    Use the GetAsXML method to get every form you want as XML. This example copies the Sales Order form as XML to the clipboard.
    If pVal.EventType = et_FORM_LOAD And pVal.FormType = 139 Then
    .... Clipboard.SetText SBO_Application.Forms(pVal.FormUID).GetAsXML
        End If

  • Screen Painter and existing forms

    Hi all,
    Is it possible to save one of the existing forms, for example, the item master form to an xml file that can be manipulated in the screen painter?  If it is possible, how would I do it?
    TIA,
    Steve

    Hey Ram,
    You will have to handle the click on the choose from list button (not sure of the item ID, use the debug information and mouse over to find it). You will also have to handle the key down tab event (CHAR = 9) and open your form as well.
    To stop business one from handling these events you will have to do it on the before and set bubblevent = false

  • Extending an existing form

    Hi there,
    for my introduction I have a lousy question:
    How do I extend an existing form in SBO ?
    (vice versa, how can I hide formelements in an existing form)
    I know, I have to capture an event, but which.
    Do you have sample code ? Perhaps C#-Code
    greetings,
    Holger

    Hi Holger,
    Moreless, you need to catch load event, get the form you need to extend and make the modifications.
    Here you have got an example of how to add a checkbox to an existing form. By the way, say that if you are going to make so many changes, you could improve performance saving you extended form into an xml file, and loading it when the estandar form should be loaded. I think there is an example on the help files.
    If pVal.FormType = 65 Then
       If pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD And Not pVal.BeforeAction Then
          Dim oForm As SAPbouiCOM.Form
          oForm = con.Forms.Item(FormUID)
          CreateControls65(oForm)
       End If
    End If
    Public Sub CreateControls65(ByVal oForm As SAPbouiCOM.Form)
    Try
       Dim oItem, oBaseItem As SAPbouiCOM.Item
       Dim oCheck As SAPbouiCOM.CheckBox
       oItem = oForm.Items.Add("chkPrice", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
       'Create a base item'
       oBaseItem = oForm.Items.Item("14")
       oItem.Top = oBaseItem.Top
       oItem.Height = oBaseItem.Height
       oItem.Width = oBaseItem.Width + 20
       oItem.Left = oBaseItem.Left + oBaseItem.Width + 15
       oForm.DataSources.UserDataSources.Add("ID" + oForm.UniqueID.Trim(), SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 3)
       oCheck = oItem.Specific
       oCheck.Caption = "Get Sales Prices"
       oCheck.Checked = False
       oCheck.DataBind.SetBound(True, "", "ID" + oForm.UniqueID.Trim())
       Catch ex As Exception
          MsgBox("Found error, msg=" + ex.Message)
       End Try
    End Sub
    Hope this example helps.
    Regards,
    Ibai Peñ

  • I want to scan in an existing form and make it typable  How do I do that starting from the Open ADOB

    I want to scan in an existing form and make it typable.

    Many may not be familiar with that product on this site.
    Can Open Adob perform an OCR action?
    Does Open Adob have a form design module?
    You can use OpenOffice.org to create a form in Write along with form fields and then Export to a PDF and keep the form fields. Any scripting for the form fields will not transfer to Adobe JavaScript.

Maybe you are looking for

  • Default values not appearing

    I've been trying to create default values for a column during and Insert. I've tried both setting the Default value in the Attribute tab of the entity and doing it within the create method, but neither of them populates my textfield. Any ideas on wha

  • Steps for creation of search help exit for a search help

    Hi, I have created a search help. I need to create a search help exit for this search help. Please let me know how to create a search help exit as well as how to link it to my search help.

  • Maintain controlling area

    Hi Guys, When i am trying to maintain the controlling area I am getting the following error. I am trying to use the copy function when trying to create the controlling area and it is giving the following message "You can only copy or replace object a

  • Can I create a sub-team project in TFS?

    In TFS, I know I can create several team projects under a team project collection. Now, based on my team, we want to create sub-team projects, can I do that using TFS? I found a link http://msdn.microsoft.com/en-us/library/vstudio/dn306083.aspx which

  • OnMouseOver refuses to work

    I have 9 mouse overs in a tabled menu of my page. The 1st 8 work beautifully but the last one (image19 as there are other menus on the page with mouseovers) never displays the "on" image and I don't get any error message. I swapped the code for the o