This VBA macro for Microsoft word will put JSP Wiki formatting on document. The original (which required some tweaks) was found at http://tikiwiki.org/tiki-index.php?page=WordToWiki_swythan
Added conversion of hyperlinks to the macro. The updated macro is attached as WikiMacros.bas. -Julian Sinai
Could it be extended to deal with embedded images? -NascifAbousalhNeto
Do you Have something like this for a excel file, I am sure it would really help! -Sapal
Unfortunately the files uploaded have been vandalized, so anyone got a fresh copy?
--monsoon
, 25-Apr-2006
Hi!
You can just download the older versions by clicking the paperclip image... Or you could restore them yourself!
I put the macro in a Word 2004 for Mac template as Word2JSPWiki.dot. Seems to mostly work (except for links with different display names).
--Jim White, 15-Jun-2006
Has anyone ever seen a plug-in/macro/or a process to go the other way?
I'd like to use JSPWiki to write Design Documents then export the pages into a Word Doc which could be presented to the client. If I cut and paste into Word directly, I get the Wiki's formatting which is not bad (I use the smallpiece skin) but I might need to adhere to a standard format.
-- MartinHache
I've made some changes to the macro to make it easier to use for my team. We are converting lots of project docs from Word to JSPWiki and most of the users are not programmers. The major changes are:
- Refactored the code so it's a little easier to work with (for me, YMMV).
- Put all the wiki formatting codes into constants. May make refactoring for other wikis easier.
- I was uncomfortable with the macro changing the original document (too easy to destroy it), so the macro now opens a new doc, copies the original to it and performs the conversion on that. I added a line to close the new document as well, but commented it out. Uncomment the line to have the wiki text just magically appear on the clipboard.
- I did some work to enhance table conversions. Rows that are formatted as all bold will be converted to header rows. Italics and underline should be converted correctly in tables. Line breaks should be handled correctly in cells.
I may also write a batch conversion program based on the macro. It would be the kind of thing you would point at a directory to convert all the Word files in the tree. Would anyone else be interested in something like that?
-- Jeff Grimshaw
Jeff,
Love the modifications/corrections you were able to make, however I think I found a bug (using MoreWikiMacros.bas
). Since I know nothing about VBScript, I'm hoping someone here can fix it.
There is something seriously wrong with the Bold function:
- If Boldface is used in the middle of a paragraph, the script gets caught in a loop and crashes Word.
- If Boldface is used at the beginning of a paragraph, it creates about 20 sets of double underline __ around the entire paragraph. This doesn't loop indefinetly, but makes a mess where none of the other scripts do.
There is also something wrong with the List Number conversion - it just plain doesn't work. My numbered lists (using just the Numbering button on the toolbar) are left behind and not converted. Am I doing something wrong with my document formatting?
Since this is the only script that does Tables correctly, I'm stuck.
Can anyone help fix this?
-- Carolinne
I ran into the same problem (stuck in loops) in a word file I was attempting to convert, so I corrected the problem. Runs fine in the file I was converting, but not tested on other Word files. Uploaded as Word2Wiki3.bas
.
Scott
08/08/2007
Jeff,
If you could create a batch converter I believe a lot of companies will thank you from the bottom of their hearts. :D. So yes please, by all means create one!
--Geoff Williams
, 05-Jun-2007
Add new attachment
List of attachments
| Kind | Attachment Name | Size | Version | Date Modified | Author | Change note |
|---|---|---|---|---|---|---|
bas |
MoreWikiMacros.bas | 10.9 kB | 1 | 05-Feb-2007 05:40 | 67.164.123.55 | |
bas |
WikiMacros.bas | 9.1 kB | 4 | 18-May-2006 21:41 | 159.53.110.143 | |
bas |
Word2JSPWiki.bas | 8.6 kB | 3 | 18-May-2006 21:42 | 159.53.110.143 | |
dot |
Word2JSPWiki.dot | 50.2 kB | 1 | 15-Jun-2006 05:54 | Jim White | |
bas |
Word2JSPWiki_fixed_numberedLis... | 8.6 kB | 1 | 25-Jan-2007 16:11 | 195.39.253.134 | Word 2 JSPWiki macro with fixed Numbered lists |
bas |
Word2Wiki3.bas | 11.4 kB | 1 | 08-Aug-2007 19:57 | 130.76.32.15 | Added v3 |