Announcement

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

  • Asdoc for graph

    Hello,

    I'm trying to export somes graph and statistics to .doc.
    It seems asdoc doesn't work with graphics (only asdocx but i don't have it).
    So i am trying to use asdoc and png2rtf on the same doc, but when i use asdoc, all my graph above are deleting

    Code:
    sysuse auto, clear
    
    asdoc sum price, title(Tableau 1 : price)  stat(mean sd min p25 p50 p75 max N) save(myfile.doc) replace
    
    scatter mpg weight
    graph export graph1.png, height(600) width(800) replace
    asdoc, text(\par \b Graphique 1 : First graph) append
    png2rtf using myfile.doc, g(graph1.png) append
    // it works if we only launch above code but not if we add more asdoc
    
    scatter weight length
    graph export graph2.png, height(600) width(800) replace
    asdoc, text(\par \b Graphique 2 : Second graph) append
    png2rtf using myfile.doc, g(graph1.png) append
    In my example we can see that if we launch all my code, only graph 2 stay in the doc. In this example, i want to have table 1, graph 1 and graph 2 on the same word (with name of graphics as text and not in the png)
    I can't buy asdocx, because my dofile must be usable by all my colleagues

    thanks,
    Raph
    Last edited by Raph Selenite; 25 Jul 2023, 09:38.

  • #2
    asdoc is from SSC. It's a good idea to ping the author, Attaullah Shah

    Comment


    • #3
      Thanks, i didnt know why could do this.

      Comment


      • #4
        RTF format has several limitations, so I created asdocx, which can create documents with text, tables, and graphs., see https://fintechprofessor.com/asdocx/...ord-documents/
        I can offer a group discount, if interested please contact at [email protected]
        Regards
        --------------------------------------------------
        Attaullah Shah, PhD.
        Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
        FinTechProfessor.com
        https://asdocx.com
        Check out my asdoc program, which sends outputs to MS Word.
        For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

        Comment

        Working...
        X