Results 1 to 3 of 3

Thread: Convert Word to BBCode

  1. #1
    josh's date at akershus stevenmilz's Avatar
    Join Date
    Feb 2011
    Location
    Northwest Florida
    Posts
    3,147

    Convert Word to BBCode

    When I write trip reports I usually write them in Word and cut-and-paste them into the forum. That doesn't bring formatting along though, just the text. Previously I'd go through the post and use the formatting buttons to add bold, underlining, italics, etc. However, with the SeaWorld trip report I just posted, I came across this webpage - https://www.phpbb.com/community/view...?f=17&t=395554 - that provides a VBA macro that applies BBCode formatting to the Word document. You can then just cut-and-paste from Word into the forum and the formatting comes along.

    Here's what I did to use it.
    1. Cut-and-paste your "real" Word document into a blank document; you don't want to mess up the original one.
    2. Click ALT-F11 to bring up the VBA editor.
    3. Double click "ThisDocument" under the "Project" heading in the "Project" window at the top-left corner of the editor.
    4. On the website, find the first code block and click the SELECT ALL link.
    5. Right-click and select COPY from the context menu.
    6. Go back to the VBA editor and paste the code into it.
    7. Place your cursor into the "Word2BBCode" sub and press F5 to run the macro.
    8. Your document should be BBCode formatted and ready for cut-and-paste.

    I had problems with the "ConvertColor" subroutine; if you do, start the process over (your document already has BBCode formatting and you don't want double-formatting) and remove the line that says "ConvertColor" before pressing F5.
    Steve
    Offsite (Jul 87, Nov 09, Feb 13) Disney Institute (Jun 97) CR (Aug 81, Aug 83, Aug 86, May 10) BLT (Dec 10, Sep 11) FW/VWL (Nov 10) Poly (Mar 11, May 11) BC/BCV (Dec 11, Mar 12, Jan 13) BWI/BWV (May 12, Dec 12, May 13, Sep 13, Mar 14, Sep 14) SSR (Oct 11) YC (Oct 12) Swan (Oct 13) WBC (Dec 13, May 14, Dec 14) Pop (Oct 14) POFQ (Jan 15, Mar 15, Sep 15, Oct 15, Jan 16, Sep 16, Nov 16, Mar 17, May 17) CBR (Dec 15) ASMo (Dec 16)

  2. #2
    Senior Member Micah008's Avatar
    Join Date
    Dec 2011
    Location
    Wisconsin
    Posts
    5,397
    Cool, thanks. I had tried to do this for a table at some point in the past, and I just gave up... this would probably have worked better than what I tried to do on my own (with Excel actually).
    Micah

    MousePerks
    Apr '87 offsite; Feb '91 offsite; Feb '04 offsite; Feb '10 Pop; Jan '12 ASSp; Jan '13 Pop; Jan '14 VGF/AKV; Mar '14 POR; Aug '14 SSR (Report); Jan '15 VGF/AKV/OKW (Report); Jan '16 BLT/BCV (Report); Aug '16 AKV; Jan '17 PVB/BWV (Report); Jan '18 Pop/BRV; Aug '18 AKV; Jan '19 PVB/BCV; Jan '20 VGF/AKV/DRR

  3. #3
    Senior Member Strangeite's Avatar
    Join Date
    May 2013
    Location
    The Alpha Quadrant
    Posts
    1,526
    That is brilliant. I have been wanting to finish my trip report, and this will make it much easier.
    I am @GrtBigBeautiful on DizTwitter

Posting Permissions

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