Results 1 to 5 of 5

Thread: Reference the notepad

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Posts
    424

    Reference the notepad

    I need to add a reference to the notepad to use it as an object. I can't find anything that points to the right place to reference it. Any ideas anyone?

    I've searched the forum and there are some wonderful things you can do with the notepad but I cannot find anything that tells me how to reference it.

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Notepad is not an ActiveX control, nor is there any reason to need it to be. Notepad does'nt do anything special. Certainly nothing that can be done in minimal coding.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Posts
    424
    I've created a report and exported it as text. In this instance it creates a blank line every 5 lines.. (I've no idea why and I've looked at it pretty intensely for a while..) I need to reference a notepad object.. or I could just shell it... and take out those blank lines. I can't import it into word or the byte spacing gets all messed up. I guess if there is no reference to it I'll just shell it and run a brute force code run on it.

    Thanks

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    Use the 'Open' file and parse the blank lines and then save it as another filename.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    VB Code:
    1. Dim myData As String
    2.  
    3. Open "myfile.txt" For Input As #1
    4.     Open "parsedfile.txt" For Output As #2
    5.         Do Until EOF(1)
    6.            Line Input #1, myData
    7.            If Trim(myData) = "" Then
    8.                Write #2, myData
    9.            End If
    10.         Loop
    11.     Close #2
    12. Close #1

    Something like that.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

Posting Permissions

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



Click Here to Expand Forum to Full Width