MSWORD-Fontname and fontsize
How to change the font type and size in MSWORD?(vl-load-com) (IF (NOT TBLWORD) (PROGN (SETQ TBLWORD (STRCAT #DRV "MSWORD.OLB")) (vlax-import-type-library :tlb-filename TBLWORD :methods-prefix "VBWORDm-" :properties-prefix "VBWORDp-" :constants-prefix "VBWORDc-" ) ))(SETQ VBWORD (vlax-get-or-create-object "Word.Application")) (vla-put-visible VBWORD :vlax-true)(SETQ DOCS (vla-get-documents VBWORD)) (setq DOC(VBWORDm-add DOCS)) (SETQ paragraphs (VBWORDp-get-paragraphs doc))(setq pg (VBWORDp-get-last paragraphs)) (setq range (VBWORDp-get-range pg)) (setq TEXTO1 "1a LINHA DE TEXTO\n")(setq TEXTO2 "2a LINHA DE TEXTO\n")(setq TEXTO3 "3a LINHA DE TEXTO\n");(VBWORDp-put-fontname "COURIER NEW") ;????????????????????????????????(VBWORDp-put-fontsize range "20") ;?????????????????????????????????????;(VBWORDp-put-bold range 1)(VBWORDp-put-underline range VBWORDc-wdUnderlineNone) (VBWORDm-InsertAfter range "MEMORIAL DESCRITIVO\n")(VBWORDm-InsertAfter range "\n")(VBWORDm-InsertAfter range TEXTO1)(VBWORDm-InsertAfter range TEXTO2)(VBWORDm-InsertAfter range TEXTO3)
thank you. Try this code
(VBWORDp-put-name (VBWORDp-get-font range ) "COURIER NEW") (VBWORDp-put-size (VBWORDp-get-font range ) 18)
~'J'~ I fixed your post, but next time use CODE tags not Quote.CODE POSTING GUIDELINES I looked all over the internet for several days and I found this tip.
Thank you.
页:
[1]