iPrank
May 18th, 2007, 03:58 PM
(Inspired by MartinLiss' utility)
Utility: Copy HIGHLIGHT-tagged code from Internet Explorer context menu
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 utility provides a complete solution for IE users.
This utility adds a new menuitem, "Copy VBCode" in Internet Explorer right-click context menu. When you select a HIGHLIGHT code block and right-click, this menuitem will appear. Clicking on the "Copy VBCode" menu will remove the numbering while maintaining line integrity and indenting. You then use Ctrl_V as normal to paste into a VB program.
For similar code in an standatd exe see this. (http://www.vbforums.com/showthread.php?t=458328)
For similar code in an Add-In see this. (http://www.vbforums.com/showthread.php?t=458438)
Code: This utility uses simple VBScript (inside CopyVBCode.html) and a Reg file (CopyVBCode.reg). Both files are available in attatched zip archive. NO COMPILATION NEEDED and there is NO DEPENDENCY (except IE :p ofcourse).
Installation:
1. Extract both files.
2. Now open the CopyVBCode.reg file in NOTEPAD.
3. Now replace the C:\\CopyVBCode.html text with the path where you extracted the html file. Remember to add double backslashes for path separator. So, if you have extracted the html file in D:\MyFolder\MySubFolder\, your regfile will look like:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Copy &VBCode]
@="D:\\MyFolder\\MySubFolder\\CopyVBCode.html"
"Contexts"=dword:00000010
4. Save the reg file and doubleclick the file to import into registry.
5. Instalation complete.
Test Page: Click Here
Feature list:
As described above
Known Problems:
Can't copy if multiple [HIGHLIGHT] block is selected.
Will not work on [CODE] block.
Screen-shots: The following shows the "Copy VBCode" menu highlighted in IE context menu
http://www.vbforums.com/attachment.php?attachmentid=56975
Author Name: iPrank
Text stolen from: MartinLiss
Idea stolen from: Static
Any feedback welcome. :)
Utility: Copy HIGHLIGHT-tagged code from Internet Explorer context menu
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 utility provides a complete solution for IE users.
This utility adds a new menuitem, "Copy VBCode" in Internet Explorer right-click context menu. When you select a HIGHLIGHT code block and right-click, this menuitem will appear. Clicking on the "Copy VBCode" menu will remove the numbering while maintaining line integrity and indenting. You then use Ctrl_V as normal to paste into a VB program.
For similar code in an standatd exe see this. (http://www.vbforums.com/showthread.php?t=458328)
For similar code in an Add-In see this. (http://www.vbforums.com/showthread.php?t=458438)
Code: This utility uses simple VBScript (inside CopyVBCode.html) and a Reg file (CopyVBCode.reg). Both files are available in attatched zip archive. NO COMPILATION NEEDED and there is NO DEPENDENCY (except IE :p ofcourse).
Installation:
1. Extract both files.
2. Now open the CopyVBCode.reg file in NOTEPAD.
3. Now replace the C:\\CopyVBCode.html text with the path where you extracted the html file. Remember to add double backslashes for path separator. So, if you have extracted the html file in D:\MyFolder\MySubFolder\, your regfile will look like:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Copy &VBCode]
@="D:\\MyFolder\\MySubFolder\\CopyVBCode.html"
"Contexts"=dword:00000010
4. Save the reg file and doubleclick the file to import into registry.
5. Instalation complete.
Test Page: Click Here
Feature list:
As described above
Known Problems:
Can't copy if multiple [HIGHLIGHT] block is selected.
Will not work on [CODE] block.
Screen-shots: The following shows the "Copy VBCode" menu highlighted in IE context menu
http://www.vbforums.com/attachment.php?attachmentid=56975
Author Name: iPrank
Text stolen from: MartinLiss
Idea stolen from: Static
Any feedback welcome. :)