Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
amirkachlon
Contributor III
Contributor III

Export TextBox object Value to txt file using VB macro

Hi all,

I have single value string in a text bix object which I want to export into txt file,

anyone can help me with syntax?

Thanks alot

Amir

1 Reply
petter
Partner - Champion III
Partner - Champion III

You can export the text along with a lot of other properties of the TextBox by doing this:

Sub myExport

  ActiveDocument.GetSheetObject("TX01").WriteXmlPropertiesFile "d:\temp\textbox.xlm"

End Sub

You will have to pick out the text by finding what is enclosed by <Text> and <v> tags... the XML-file contains hundreds of lines:

<QVObjects>

  <TextObjectProperties>

    <Layout>

....

....

.....

      <Text>

        <v>ABC</v>

      </Text>

.....

.....