Hi,
Is there way to generate a global or local macro equal to a string value like "Malawi" with the name country that could be used to replace a text value in subsequent putdocx commands? We are creating multiple sampling plans using stata and would like to do this with putdocx.
For example,
global country="Malawi"
putdocx begin, header(country plan) font(arial, 11)
putdocx paragraph, style(Title)
putdocx text ("Country Plan for ")
putdocx text (`country')
putdocx save "Country plan", replace
putdocx clear
This would then allow the user to just replace the country name once in the putdocx file instead of multiple times each time the country changes.
Thanks!
Is there way to generate a global or local macro equal to a string value like "Malawi" with the name country that could be used to replace a text value in subsequent putdocx commands? We are creating multiple sampling plans using stata and would like to do this with putdocx.
For example,
global country="Malawi"
putdocx begin, header(country plan) font(arial, 11)
putdocx paragraph, style(Title)
putdocx text ("Country Plan for ")
putdocx text (`country')
putdocx save "Country plan", replace
putdocx clear
This would then allow the user to just replace the country name once in the putdocx file instead of multiple times each time the country changes.
Thanks!

Comment