# VBForums UtilityBank > UtilityBank - IDE Add-Ins >  Paste VBCode

## MartinLiss

Add-In: Paste HIGHLIGHT-tagged code

Title: Paste 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 Add-In provides a complete solution. After copying the highlight-tagged code you want to use, all you need to do is the press the "paste" button that will have been added to your IDE toolbars and the code will be pasted into an open code window. The Add-in uses Word (which must be on your PC) in the background to remove the numbering while maintaining line integrity and indenting. Read the HowTo.txt file included in the zip for creation and usage instructions.

For similar code in a regular application see this.

Feature list:
As described above

Known Problems:
None

Screen-shots: The following shows the button added by the Add-In



Author Name: Martin Liss

----------


## danasegarane

Dear Martin,
               In the Addins Manager, it showing as missing.How can solve this issue and one more thing ,What about using this for Vb.net  :Smilie: 

Dana

----------


## krtxmrtz

I tried to implement this code but after I typed AddToIni.AddToIni followed by Return I got this error.

----------


## MartinLiss

> Dear Martin,
>                In the Addins Manager, it showing as missing.How can solve this issue and one more thing ,What about using this for Vb.net 
> 
> Dana


If you compiled it and then did AddToIni that should not happen. In any case try that again with no other VB sessions open. 

As for .Net someone else will need to create a .Net version.

----------


## MartinLiss

> I tried to implement this code but after I typed AddToIni.AddToIni followed by Return I got this error.


I don't think that that is caused by my code but to fix it do

VBA.Chr$(32)

----------


## krtxmrtz

I had to replace that line and many other occurrences of various string functions as new error messages were coming out. Finally I compiled the dll and got this message that a library was missing.





Unfortunately I could not find version 10 of the library that it was looking for (I was testing in a W98 based computer), only version 8. But it was useless for I got a new error message.

----------


## MartinLiss

What Word References do you have available?

----------


## krtxmrtz

As I said, I have version 8 of that dll. I have a version 11 on another (WinXP-based) computer but I assume it wouldn't work on the Win98-based computer.

Now, the reason I'm testing the add-in in that old Win98 (laptop) computer is I have an English language version of Visual Studio in it. On the XP computer I have a Spanish version and I always run into trouble with third party add-ins due to local settings (you see, I really don't feel like racking my brain to long, maybe I'd rather manually delete numbered lines  :Big Grin:  )

----------


## iPrank

If I'm correct the [highlight] tag problem is not present in [code] tag.  

It would be very nice if you add a new feature in this addin - Copy-As-Colored-Code.
This method will copy selected code from the IDE and wrap them inside [CODE] tags with color formatting. This will help _posters_ as well.

I think NoteMe's VBF extension has similar option. But it will be easier to use from IDE (and for non-Fx users).



```
Option Explicit

Private Sub Form_Load()
    MsgBox "Hi !"
    ' blah blah
End Sub
```

PS. I have no problem with [highlight=vb] tag in Opera. Use Opera.  :Big Grin:

----------


## krtxmrtz

> ...
> PS. I have no problem with [highlight=vb] tag in Opera. Use Opera.


It's nice to know.

----------


## krtxmrtz

> It's nice to know.


...and now I've finally taken some time to install Opera and try pasting numbered code. Works very nicely.

----------


## ed08724

I found an easier way. Notepad didn't work for me, it was still 1 big line with word wrap on or off.
Just click to reply to message then copy the text from there. Then cancel the reply.

----------


## krtxmrtz

> I found an easier way. Notepad didn't work for me, it was still 1 big line with word wrap on or off.
> Just click to reply to message then copy the text from there. Then cancel the reply.


Yes, that's useful, specially because I use Firefox and always forget to use Opera when browsing the forums  :Smilie:

----------


## iPrank

[OffTopic]
OperaView Extension for firefox : Open pages in Opera from Firefox and Mozilla context menus.
[/OffTopic]

----------


## krtxmrtz

> [OffTopic]
> OperaView Extension for firefox : Open pages in Opera from Firefox and Mozilla context menus.
> [/OffTopic]


So, as far as I undertand it, what this add-on does is just start Opera saving you the trouble of minimizing the Firefox window to make the Opera icon on the desktop visible so you can click on it. Kind of fancy thing though I wonder if it's really useful.

----------


## Lord Orwell

> So, as far as I undertand it, what this add-on does is just start Opera saving you the trouble of minimizing the Firefox window to make the Opera icon on the desktop visible so you can click on it. Kind of fancy thing though I wonder if it's really useful.


possibly.  there's an IE add-in as well for firefox, and it actually uses the active x control to embed an IE session in a tab.

----------

