Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I've been able to export an object to xml using
set oTable = ActiveDocument.GetSheetObject( "Note_Export" )
oTable.ExportXml "\\RemotePath\Test\" + sFileName
It looks like I can get the text of a variable by doing
set Var = ActiveDocument.Variables("Note").GetContent.String
But how to save this to a file?
Hi Michael,
There is no direct QV API call to write variable values to a file. You can use the FileSytemObject to write the date. For example, see DocAnalyzer. However, this requires System Access.
As an alternative, you can put the variable in a chart as an expression and export the chart. No System Access required. See attached. Test it out, I got some funny results when I used a multi-line note. Any of the various Export API methods, Export, ExportEx with format, ExprtHtml should work
-Rob
This is from a macro that is called from a button
Hi Michael,
There is no direct QV API call to write variable values to a file. You can use the FileSytemObject to write the date. For example, see DocAnalyzer. However, this requires System Access.
As an alternative, you can put the variable in a chart as an expression and export the chart. No System Access required. See attached. Test it out, I got some funny results when I used a multi-line note. Any of the various Export API methods, Export, ExportEx with format, ExprtHtml should work
-Rob
Thanks Rob! So I'm trying to find a good way to record permanant 'Notes' into a DB. If I use a table box with an inputfield or a ListBox it won't line wrap during text entry (after hitting enter it line wraps just fine) so my reasoning was I could use an input box and have them press the edit expression and allow them to do a multi line note. It Doesn't seem like there is a super easy way to do this though.