Op een engelstalig forum heb ik het volgende gevonden, ik heb het
niet geprobeerd ! :
Hi,
you certainly noticed that when converting a document from Openoffice to MS-Word, equations are not well converted : there are a lot of blank squares everywhere.
Here follows a solution to this problem. It was successfully tested with Openoffice 2.3.1 on Linux and MS-Word 2000 on Windows, but you should try it with other versions.
The solution is :
1. First, convert your OO document to MSWord (in OO, don't forget to check that in the menu Tools/Options/Load Save/Microsoft Office, the Mathtype options are both checked)
2. Then open your document into MS-Word and apply one of the macros given below
3. Equations should be well converted and you can edit them with Mathtype or Equation Editor. However, if you changed the default equations fonts, greek letters may be not displayed correctly inside the Mathtype editor. But this is not a problem since they appear correctly in the document.
Please tell me if this solution worked for you!
Best regards,
Roland
Here are the macros.
If you have Mathtype, use the following macros :
Sub OOEquationConvertDocument()
'
' Convert all equations of the document
'
For Each iShape In ActiveDocument.InlineShapes
If iShape.Type = wdInlineShapeEmbeddedOLEObject Then
'MsgBox (iShape.OLEFormat.ClassType)
If iShape.OLEFormat.ClassType = "Microsoft" Then
iShape.OLEFormat.ConvertTo ClassType:="Equation.DSMT4", DisplayAsIcon:=False
End If
End If
Next iShape
End Sub
Sub OOEquationConvertSelection()
'
' Convert all equations of the current selection
' Caution! Doesn't work (why?) if the entire document is selected
'
For Each iShape In Selection.InlineShapes
If iShape.Type = wdInlineShapeEmbeddedOLEObject Then
'MsgBox (iShape.OLEFormat.ClassType)
If iShape.OLEFormat.ClassType = "Microsoft" Then
iShape.OLEFormat.ConvertTo ClassType:="Equation.DSMT4", DisplayAsIcon:=False
End If
End If
Next iShape
End Sub
If you don't have Mathtype (then you should have Equation Editor), use the following macros :
Sub OOEquationConvertDocument()
'
' Convert all equations of the document
'
For Each iShape In ActiveDocument.InlineShapes
If iShape.Type = wdInlineShapeEmbeddedOLEObject Then
'MsgBox (iShape.OLEFormat.ClassType)
If iShape.OLEFormat.ClassType = "Microsoft" Then
iShape.OLEFormat.ConvertTo ClassType:="Equation.3", DisplayAsIcon:=False
End If
End If
Next iShape
End Sub
Sub OOEquationConvertSelection()
'
' Convert all equations of the current selection
' Caution! Doesn't work (why?) if the entire document is selected
'
For Each iShape In Selection.InlineShapes
If iShape.Type = wdInlineShapeEmbeddedOLEObject Then
'MsgBox (iShape.OLEFormat.ClassType)
If iShape.OLEFormat.ClassType = "Microsoft" Then
iShape.OLEFormat.ConvertTo ClassType:="Equation.3", DisplayAsIcon:=False
End If
End If
Next iShape
End Sub