It looks like you're using an Ad Blocker.

Please white-list or disable AboveTopSecret.com in your ad-blocking tool.

Thank you.

 

Some features of ATS will be disabled while you continue to use an ad-blocker.

 

BB Code Macros

page: 1
0

log in

join
share:

posted on Jan, 16 2008 @ 08:02 AM
link   
I am new here and just learning the BB Code, I figure that the best way to write out a long post would be to use Word but I want to add the bb code to my document but don't want to have to hit a thousand keys more than I have to.

Does anyone know how to macro the bb code for word?

an example would be to integrate a hyper link set for this website would be the codes [url = ] [ /url ]

Is there a way to macro this in word so that I don't have to type that out and risk messing up the hyper link or the code?

that way I can copy and paste the entire post in one shot I could also do all the research without having to be on a post write screen to do it.

I know I am just being lazy. :p



posted on Jan, 16 2008 @ 06:35 PM
link   
I googled around for a bit, but no luck. Just think you could be the first to create it



posted on Jan, 16 2008 @ 06:56 PM
link   
bbcode is really easy to learn if you haven't yet. Personally I find it faster to just hand type everything. There are add-ins for firefox that automate entering bbcode but I find these things slower than just using my keyboard.

Edit: I should mention that there are decent alternatives to creating macros.

Fass




[edit on 1/16/2008 by kinglizard]



posted on Jan, 17 2008 @ 08:50 AM
link   
Thank you kinglizard. That was very helpful. I am getting used to BB Code but I still like to write my posts down on Word before I post them so that I can clearly see what I am writing.

Unfortunately I don't know enough about macro coding to be able to create this on word. I would love to come up with something.

thank you though your link was very helpful.



posted on Jan, 19 2008 @ 03:36 PM
link   
reply to post by radiodjguy
 

I have Office 2003, I don't know if this will appear with the same names in your version.

1. Go to Tools, Macro, Visual Basic Editor or press Alt+F11
2. Paste the folowing code into the place you want it, the present document or the "Normal" template

Sub URL()

   Selection.InsertBefore "[­url=" & sText & "]"
   Selection.InsertAfter "[/url]"

End Sub


3. If you want something like the code used by ATS, paste the following code

Sub URL()
Dim sTextURL As String
Dim sTextName As String

   sTextURL = InputBox("Write the URL for which you want to create a link with BB code:", "URL", "http://")
   sTextName = InputBox("Write the text that will appear for the link:", "URL")
   Selection.InsertBefore "[­url=" & sTextURL & "]" & sTextName & "[/url]"

End Sub


4. If you want to add the url to the selected text, paste the following code.

Sub URL()
Dim sTextURL As String

   sTextURL = InputBox("Write the URL for which you want to create a link with BB code:", "URL", "http://")
   Selection.InsertBefore "[­url=" & sTextURL & "]"
   Selection.InsertAfter "[/url]"

End Sub


If you want something more, just ask.



new topics

top topics
 
0

log in

join