Skip to Content
Former Member
May 17, 2005 at 11:26 AM

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)


'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...