October 22nd, 2003, 12:48 PM
Change Notepad properties using VBA?
Dores anyone know how I could change the Font, Font Style, Font size, and page setup information (specifically margins) in Notepad by using VBA? I have a third party application that I can program VBA in but I must ensure Notepad is set up properly before printing the file I am creating or it will not format properly.
October 22nd, 2003, 06:20 PM
On win 2k
have a look at registry:
You can change them only if notepad is not already opened (notepad loads settings at startup, and write them when quitting. Thus last notepad to close will write to registry...)
lfFaceName= font name
iPointSize= size of font, where:
size (hex=64 =10 points)
(hex=c8 = 20 points)
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
October 23rd, 2003, 07:44 AM
Thanks, Cimperiali! I'll try it!
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!