Results 1 to 7 of 7

Thread: Copy/Paste HIGHLIGHT-Tagged Code From Fourms

  1. #1

    Thread Starter
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,427

    Copy/Paste HIGHLIGHT-Tagged Code From Fourms

    Utility: Copy and paste HIGHLIGHT-tagged code

    Title: VBCode

    Description: As you may be aware when you try to copy and then paste VB code which has been displayed in the forums using [Highlight=VB] tags, the result is a single run-on line. A partial solution to that problem is to paste the code into WordPad (not NotePad) and then copy again from there, but while that gives separate lines, all indentation is lost. This app provides a complete solution. When run once it stays quietly in the background. Then if you use Alt_C rather than Ctrl_C to "copy" HIGHLIGHT-tagged code from the forums it uses Word (which must be on your PC) in the background to remove the numbering while maintaining line integrity and indenting. You then use Ctrl_V as normal to paste into a VB program. The program will remain in the background until you reboot or delete the VBCode.exe Image Name from the Task Manager Processes list.

    For similar code in an Add-In see this.

    Feature list:
    • As described above


    Known Problems:
    • None

    Screen-shots: N/A

    Author Name: Martin Liss
    Attached Files Attached Files

  2. #2

  3. #3
    Hyperactive Member
    Join Date
    Oct 2001
    Location
    Washington DC
    Posts
    314

    Re: Copy/Paste HIGHLIGHT-Tagged Code From Fourms

    I must be missing something. Why not simply use code /code as is done on all other programming forums? It seems to work fine for me here.
    Code:
                             example
                             if A <> B then exit sub
    Just wondering.... mac

  4. #4

    Thread Starter
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,427

    Re: Copy/Paste HIGHLIGHT-Tagged Code From Fourms

    Quote Originally Posted by Mr.Mac
    I must be missing something. Why not simply use code /code as is done on all other programming forums? It seems to work fine for me here.
    Code:
                             example
                             if A <> B then exit sub
    Just wondering.... mac
    It's because [code] tags don't have the coloration that the VB IDE supplies. We used to have [vbcode] tags which were an almost perfect reproduction of the VB IDE but sadly those tags are no longer supported. The substitute for the [vbcode] tags are the [highlight=vb] tags and while they don't exactly reproduce the VB IDE coloration they are useful when you want to point out line numbers.

  5. #5
    Hyperactive Member
    Join Date
    Oct 2001
    Location
    Washington DC
    Posts
    314

    Re: Copy/Paste HIGHLIGHT-Tagged Code From Fourms

    Oh, thanks.

    Any chance of giving me a link to some code somewhere that illustrates the benefits of not using [code]. I never noticed the "coloration" you speak of. I guess when someone is showing an error.

    Mac

  6. #6

  7. #7
    Hyperactive Member
    Join Date
    Oct 2001
    Location
    Washington DC
    Posts
    314

    Re: Copy/Paste HIGHLIGHT-Tagged Code From Fourms

    Thanks! That answers my questions. I won't mark this resolved as the thread is a statement, not a question.

    Mac

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