Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • putting commands in putdocx when calling .do file

    Hi. I have two simple .do files for creating MS Word docs using the -putdocx- command (Stata 15.1/MP):
    Code:
    putdocx clear
        putdocx begin, font("Cambria", 10)
        putdocx table tbl1 = etable, width(95%)
        putdocx save $name.docx, replace
    The second .do file uses -append- instead of -replace-. I use a global macro in the .do file with the regressions and then call the .do file above to make the document. Is there a way to insert in the document the regression command that was run? I.e., if I append many tables of outputs, do I have to have another macro repeating the cmd line or is there simpler way to do that? (Searching statalist for command when discussing putdocx created problems for searching....)

  • #2
    You may try the note or title options:
    Code:
    putdocx table tbl1 = etable, width(95%)  note("Command"`=e(cmdline)') title("Command"`=e(cmdline)')

    Comment


    • #3
      Thanks!

      Comment

      Working...
      X