Dear all
I am using Stata 15.0 and am looking for a way to define the # in 'putdocx image imagename.png, height(#[unit])' as a variable value rather than a fix number. Is this possible? I tried workarounds like tabulating variables prior to running 'putdocx image imagename.png, height(#[unit])' and replacing the '#' with 'r(min)' (which gives an error; option height not specified correctly) or even defining a 'local var=r(min)' and running the command 'putdocx image imagename.png, height(`$var')' (which doesnt give an error but seems to be ignored, so the images are added to word in default size).
Data example is really simple here, yet I'll give one:
So let's say I want the image height to be 83.91846 (or 84 after rounding sports variable) pt. But variable, as image sizes will refer to values of different variables throughout do-File.
Thanks in advance for your help!
I am using Stata 15.0 and am looking for a way to define the # in 'putdocx image imagename.png, height(#[unit])' as a variable value rather than a fix number. Is this possible? I tried workarounds like tabulating variables prior to running 'putdocx image imagename.png, height(#[unit])' and replacing the '#' with 'r(min)' (which gives an error; option height not specified correctly) or even defining a 'local var=r(min)' and running the command 'putdocx image imagename.png, height(`$var')' (which doesnt give an error but seems to be ignored, so the images are added to word in default size).
Data example is really simple here, yet I'll give one:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float sports 83.91846 83.91846 83.91846 83.91846 83.91846 end
Thanks in advance for your help!
Comment