Extension talk:Word2MediaWikiPlus/old talk page

From mediawiki.org
THIS IS THE OLD TALK PAGE FOR THE Word2MediaWikiPlus EXTENSION.

PLEASE DON'T ADD CONTENT HERE.


The following discussion has been transferred from Meta-Wiki.
Any user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).

Please take a look at the FAQ. Other than that feel free to discuss!

Feedback Version 0.7[edit]

0.7.0.7 works great! Setup: Word 2003 de, Powerpoint 2003 de, MediaWiki 1.8.1 en

0.7.0.10 is working well for me, even though I had to make some adjustments mentioned elsewere in this document. Thank you very much for this work. This is a great software! Client: Word 2003 (Portuguese - Brazilian), Windows XP. Server: MediaWiki 1.8.2 using Portuguese - Brazilian language on a Windows server. --Fernandoacorreia 17:52, 5 December 2006 (UTC)Reply

0.7.0.11 is bloody good - I had to set tabs to '3' with using IE to get the image to upload. Otherwise, it is awsome. Should save alot of time converting my 600+ word docs. --Halski 12:38, 9 Jan 2006

Image conversion suggestion[edit]

Instead of copying all the pictures to a new document and than saving this as html and than using the generated images, can you use some of the features of the word macro created by Stephen Lebans? (see [http://www.lebans.com/msword.htm]

This is using the contents of the clipboard to construct a DIB image and than save this. This way you can skip the select all images to new document and save to html part. This DIB can than be converted to any other image type when needed. It also allows for the exact extraction of the image in the word document.

Comment:
Oh, no, I am sorry. For a number of reasons this does not work

  • You would loose quality. For instance a jpg-picture would be converted to bmp and then (manually) back to jpg.
  • There are known errors with this procedure, so the picture looses quality. Try yourself: make a screenshot (preferredly 1280x1024), paste it in word and then save it using the proprosed makro. It is not sharp anymore.
  • A number of formats could not be converted, WMF-Graphs or Powerpoint slides.
  • Problems with pictures larger then 800 x 600
  • DIB must be converted manually. The macro focusses on automatic extraction.

I actually tried this macro in the very beginning, I also tried MS Photo Editor and SnagIt. HTML-Export has the best results.

General Questions[edit]

Q: I haven't had time to go through the code in detail but it's a nice effort what you are doing. Just a question: Do you think it will be possible to completely overcome the problem of merged cells in tables in the future?

A: The problem? That is not very specific. To my knowldedge, there has not been a problem with merged cells. Version 0.7 had a programming error due to new functionality which was fixed with 0.7.0.8. If you have a document with a problem, please send it to me by e-Mail. --GunterS 18:47, 15 November 2006 (UTC)Reply
A: Well, I don't think that comparing the width of cells is a good way to check if they are merged (Comment extracted from your code: 'This is very simple. One could calculate the width and then determine if there are two merged cells in a row!)
A: Oh, that is correct. I have not had a table where this actually was a problem. If you look at the ToDo-List (modWord2MediaWikiPlus) you will find an entry "reprogramming of table function". Definitly not in 2006.

Q: Viruschecker F-Secure complains "Possibly infected with an unknown virus" when scanning the zip file
Please can you explain, why the F-Secure virus scanner says "Possibly infected with an unknown virus" when scanning your zip file http://www.beadsoft.de/files/Word2MediaWikiPlus.zip ? --Wikinaut 15:58, 12 September 2006 (UTC)Reply

A:Please ask F-Secure. The scanner probably scans the word document for macros. Any macro could be a virus.

Q: Tested on a Mac? Step-by-step instructions?
I'm trying to use Word2MediaWikiPlus on a Mac with Word X for Mac, and not having luck yet. I was able to copy the macros from the project file to the normal.dot without trouble, but none of the macros seem to run, either in the install/demo files or in my own work: the included buttons do nothing, and running the macros directly (from Tools > Macros) produces an error:

Compile Error:
Expected:  expression

Any suggestions? --GW 17:22, 29 November 2006 (UTC)

A: Since I do not have a Mac, there is no way for me to adapt the macro to the Word X specifics.
A: Thanks, that makes me feel better anyhow, knowing that I didn't do something wrong; I just need to go try on a Windows machine. It might be wise to note somewhere on the main documentation page that this tool is thus far only tested on Windows. --GW 08:36, 5 December 2006 (UTC)

Feature requests[edit]

Could you support Office 97?
I am sorry. There have been too many advancements in the newer word versions, especially word basic. I am having trouble supporting Word 2000.

Indented lists[edit]

It would be great to recognize indented list like this:

  • Item 1
    • Item 1A
    • Item 1B
  • Item 2

--Fernandoacorreia 13:10, 5 December 2006 (UTC)Reply

Images without accents[edit]

MediaWiki has issues with accents in image names when running under Windows. Since Word2MediaWikiPlus uses the article name as the base name for the images, that can lead to garbled image names that won't be shown on the article.

There could be an option to remove accents from image names. It could be implemented like this:

In Public Sub MediaWikiExtract_ImagesHtml:

ImageNameBase = GetReg("ImageNamePreFix") & RemoveAccents(DocInfo.ArticleName) & "_"

In a new function:

Public Function RemoveAccents(ByVal inputString As String) As String
    Const accentString As String = "ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÏÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðñòóóôõöùúûüýÿ"
    Const nonAccentStr As String = "AAAAAACEEEEIIIIINOOOOOUUUUYaaaaaaceeeeiiiionoooooouuuuyy"
    Dim i As Integer
    For i = 1 To Len(accentString)
        inputString = Replace(inputString, Mid(accentString, i, 1), Mid(nonAccentStr, i, 1), , , vbBinaryCompare)
    Next i
    For i = 1 To Len(inputString)
        If Asc(Mid(inputString, i, 1)) > 127 Then
            Mid(inputString, i, 1) = "_"
        End If
    Next i
    RemoveAccents = inputString
End Function

--Fernandoacorreia 16:27, 5 December 2006 (UTC)Reply

Document protection[edit]

Since the macro converts the document in-place there is a risk that a single keystroke will save the converted version over the original one. This is not friendly to less experienced users and can cause loss of data. A more safe alternative would be this sequence: 1. Save the current document (in case there are pending changes). 2. Save as a temporary file. 3. Convert using this temporary file (now the current one) 4. After conversion, close the temporary file without saving it.

Bugs as of Version 0.7[edit]

Report bugs here. Better send problematic document to my e-Mail, see contact on the project page.

Loop in RemoveDir[edit]

I had an endless loop in the RemoveDir function. It seemed that the "Extra_Formats" folder could not be deleted and the macro kept trying to delete it over and over again. I was able to ignore the error by commenting out a line:

If (GetAttr(DirName & Name1) And vbDirectory) = vbDirectory Then
    RemoveDir DirName & Name1, ToBin, StopError, DirCount
    'Name1 = Dir(DirName, vbDirectory)

--Fernandoacorreia 13:13, 5 December 2006 (UTC)Reply

Framed images[edit]

Images are being decorated with frames even though there are no frames in the image on the Word document. Looking at the macro, ImageInfo.hasFrame is TRUE, even though it shouldn't be. This is using Word 2003 and HTML conversion. --Fernandoacorreia 17:34, 5 December 2006 (UTC)Reply

Invalid article names[edit]

If there is a "&" character in the article name, the name will be truncated. Other invalid characters like "#" probably will cause problems as well. The macro could check the validity of the characters on the Article Name field on the form. --Fernandoacorreia 17:44, 5 December 2006 (UTC)Reply

Wrong form title[edit]

The title of the conversion form is "MediaWiki2WordPlus". It should be "Word2MediaWikiPlus". Or even better, "Convert to MediaWiki". --Fernandoacorreia 18:17, 5 December 2006 (UTC)Reply

Upload Path not correct[edit]

Problem: In some installations with Firefox 1.5 it is not possible to upload pictures because the path is messed up.

A: This applies to all browsers if there are special characters like ()+^ in the name and is a sendkeys problem. Will be fixed with the 0.7 release.


Upload big files[edit]

When you download a big file the macro does not work properly. Files are not download because of a supplementary form to confirm the upload.
Here is my fix: Around line 4651, replace:

 For i = 1 To ImageUploadTabToEnter
   SendKeys "{Tab}", True:  DoEvents: Sleep 100
 Next

by

 ' mbo modification
 ' check "Ignore any warnings" to avoid supplementary form to confirm the upload
 For i = 1 To 2
   SendKeys "{Tab}", True:  DoEvents: Sleep 100
 Next
 SendKeys " ", True: DoEvents
 For i = 1 To (ImageUploadTabToEnter - 2)
   SendKeys "{Tab}", True:  DoEvents: Sleep 100
 Next

I tried this code for firefox2.

Converter found a non convertable object[edit]

 MediaWiki2WordPlus Converter found a non convertable object. Please send example to developer.
 m:Word2MediaWikiPlus
 FormType = 11
File:Administration and Configuration 01.png
 text here. Click the plus sign [<font color="#666666">'''+'''</font>] next to the function area.

Bugs as of Version 0.6e[edit]

Report bugs here. Better send problematic document to my e-Mail, see contact on the project page.

Bugs as of Version 0.6c[edit]

Do not report any more bugs for this version.

Fixed:Problem with Image Conversion[edit]

System:

  • Win XP Professional, DE
  • Office 2002 SP3, DE
  • MS Photo Editor 3.0.2.3, DE
  • IE 6.0 SP2, DE

Problem:

  • Error Message "MediaWikiConvert_Images / ErrNo: 4120 Falscher Parameter"
  • No images are converted by the macro

Image conversion in Other Word files works fine.

Thanks a lot for this wonderful tool!!!

--149.236.4.99 12:32, 1 September 2006 (UTC)Reply

BugFix: Solved with Version 0.6d, but image can not be converted. Use V0.7 instead.

Code Changes[edit]

FIXED with 0.6.c:Doesn't work without Photo editor[edit]

I wanted to convert a doc, however it didn't work as I don't have the Photo editor installed. (Error message: "Photo Editor not found. Check path.") So I tried to remove all images from the doc and convert then. Still get the same message, no conversion whatsoever. Word 2003 english, WinXP Professional German. --80.109.61.51 16:14, 9 September 2006 (UTC)Reply

Surprise, it is in the manual! Word2MediaWikiPlus#Requirements
Surprise, I had read the manual. It says "If you do not have the MS Photo Editor, you can not convert pictures with this macro!". I don't want to convert pictures, just text. Yet it doesn't work. --80.109.61.51 13:41, 1 October 2006 (UTC)Reply

Well, I have not thought about that problem. Thanks for pointing it out.

For now you need to change the macro:

Within the Function MW_GetEditorInfo you need to change the line:

    'MsgBox EditorTitlePE & " not found. Check path:" & vbCr & vbCr & EditorPathPE, vbCritical, ConverterPrgTitle

just delete the line or make it a comment, add a ' in front of it.

Then you need to uncheck "image conversion".

modWord2MediaWikiPlus 0.6a changes[edit]

This is a really great macro! Thank you very much. In the hope of helping other users I'll list some things I ran into while using Word2MediaWikiPlus.

Environment: Windows 2003, Office 2003 (English)

  • Install MS Photo Editor as described in: http://support.microsoft.com/kb/817095/en-us.
  • Not only IE sidebars have to be closed but also IE toolbars like the google toolbar
  • I had to make some changes because my MediaWiki uses index.php and for example my main page is at: http://<HOSTNAME>/mwiki/index.php?title=Main_Page

Changes

Start Word. Tools, Macro, Macro's, select: Normal.modWord2MediaWikiPlus.Word2MediaWikiPlus and press edit

The visual basic editor will open. Go to modWord2MediaWikiPlus

change the line: Public Const WikiSearch$ = "Special:Search?search=" 'all languages
to:              Public Const WikiSearch$ = "index.php?title=Special:Search" 'all languages
change the line: Const ImageUploadAdress$ = "Special:Upload"
to:              Const ImageUploadAdress$ = "index.php?title=Special:Upload"

--VoskampM 08:21, 3 August 2006 (UTC)Reply

Thanks, will be implemented in next version. --GunterS 16:48, 1 October 2006 (UTC)Reply

Problem mit der Funktion "Upload Images"[edit]

Vielen Dank für diese tolle Funktion. Bei der Nutzung bin ich auf ein Problem im Zusammenhang mit dem Hochladen von Bildern gestoßen, wofür ich folgende Lösung gefunden habe.

Der im folgenden dargestellte VBA-Code (MS Word, WinXP) bezieht sich auf Word2MediaWikiPlus in der Version 0.6b. Durch diese Änderung wird es möglich, das in dem Makro enthaltene Feature für einen automatisierten Upload von Bildern auch von einem Arbeitsplatz aus nutzen zu können, an dem das Microsoft ActiveX-Control für den Datei-öffnen-Dialog ComDlg32.ocx nicht lizenziert ist. Dies ist normalerweise nämlich nur dann gegeben, wenn z.B. VisualStudio oder eine VB-Entwicklungsumgebung installiert ist. Alle Änderungen zum ursprünglichen Code sind mit der Markierung "#MGe#" gekennzeichnet.

Geänderter Code in frmW2MWP_UploadImages[edit]

Coding deleted, as it is now implemented. Look in history, if interested.

Downloads Missing[edit]

I will be happy to have them on my web host for download and to donate space for project.

Randalm --209.162.209.18 16:30, 19 December 2006 (UTC)Reply

Thanks. I had a litte misunderstanding with my provider. Download is available again. --GunterS 17:52, 20 December 2006 (UTC)Reply

this project has expired and is now offline[edit]

What does that mean? Are you revoking the GPL license of published versions of this software? --Fernando Correia 10:34, 8 February 2007 (UTC)Reply