Change Notepad properties using VBA?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Change Notepad properties using VBA?

Hybrid View

  1. #1
    Join Date
    Feb 2001
    Location
    PA
    Posts
    163

    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.

    Thanks-
    Cubbie

  2. #2
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    On win 2k

    have a look at registry:
    Hkey_current_user\software\microsoft\notepad

    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.

  3. #3
    Join Date
    Feb 2001
    Location
    PA
    Posts
    163
    Thanks, Cimperiali! I'll try it!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center