Loading ...
Sorry, an error occurred while loading the content.

23431Re: Using ^$GetDocListAll$ in an outline document

Expand Messages
  • joy8388608
    Nov 19, 2012
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "flo.gehrke" <flo.gehrke@...> wrote:
      > --- In ntb-clips@yahoogroups.com, "joy8388608" <mycroftj@> wrote:
      > >
      > > Some ways of getting ^$GetDocListAll$ to work on ALL text in an
      > > outline are clip code to loop through all the topics, code to
      > > copy all topics to a new, temp doc and work on that, maybe code
      > > to save the outline as a temp file and rename ext to .txt then
      > > open that and work on it, etc.
      > >
      > > Has anyone found a nicer way of doing this?
      > Hi Joy,
      > I wouldn't loop through all the topics. Open any sample OTL and try this...
      > ^!SetScreenUpdate Off
      > ^!Toolbar New Document
      > ^$GetFileText(^$GetDocumentPath$SAMPLE.OTL)$
      > ^!Select All
      > ^!InsertText ^$GetDocListAll("Search pattern";$0\r\n)$
      > You will see the output immediately in a second document.
      > Regards,
      > Flo

      Hi Flo,
      Thanks for the good idea. I didn't think about using GetFileText for returning the entire .otl file as text so that works great.

      There still is the problem of functions such as ^$GetDocReplaceAll$ which only works on the current outline topic. But I found that adding two lines such as

      ^!Save AS "C:\<origfolder>\<origfilename>.otl"
      ^!ToolBar Reload Document

      works pretty well as long as you don't accidentally overwrite the original doc if that was not the intent.

    • Show all 4 messages in this topic