As I had no response to my request I have tried to solve this problem myself I was very necessary and after many many attempts I got the solution and I'm also interested in showing to whom.
- ;;;(vl-load-com) (setq MSWORDAPP (vlax-get-or-create-object "Word.Application")) (vla-put-visible MSWORDAPP :vlax-true) (setq docs (vla-get-documents MSWORDAPP)) (SETQ doc (vlax-invoke-method docs 'Add))(setq paragraphs (vlax-get-property doc 'Paragraphs)) (setq pg (vlax-get-property paragraphs 'last)) (setq range (vlax-get-property pg 'range)) (vlax-put-property (vlax-get-property range 'font) 'name "COURIER NEW") (vlax-put-property (vlax-get-property range 'font) 'size 15);(setq WDRANGE (vlax-get-property (vlax-get-property (vlax-get-property MSWORDAPP 'ActiveDocument) 'WORDS) 'last)) (vlax-invoke-method range 'InsertAfter "TEXTO NEGRITO, ")(vlax-put-property range 'bold 1);(setq WDRANGE (vlax-get-property (vlax-get-property (vlax-get-property MSWORDAPP 'ActiveDocument) 'WORDS) 'last)) (vlax-invoke-method range 'InsertAfter "TEXTO NORMAL, ") (vlax-put-property WDrange 'bold 0);(setq WDRANGE (vlax-get-property (vlax-get-property (vlax-get-property MSWORDAPP 'ActiveDocument) 'WORDS) 'last)) (vlax-invoke-method range 'InsertAfter "TEXTO NEGRITO.\n")(vlax-put-property WDrange 'bold 1);;;
Thank you.
OK. |