When I import a Word document into Confluence, several wiki markup macros appear. (Something as simple as importing a bracket "[" will trigger the macro.)
Is there any way to stop this behavior? I don't want any wiki macro content in my pages after importing documents.
https://confluence.atlassian.com/doc/import-a-word-document-into-confluence-170493136.html
I belive the above link will solve your issue
I created a solution. It wasn't hinted at anywhere on the page you suggested. You can run VBA on the content to Find/Replace ASCII characters (like the bracket) with their entity numbers. Then import.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Brock Price Do you happen to have the VBA code lying around somewhere?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Deniz. Below is what I used. It was far from a silver bullet, but it did help. Some characters I couldn't escape. I suspect I commented out code (below) that wasn't working. If you use, please test prior to using.
Sub EscapeSpecialChar()
'This code will escape these characters: % | { @ # *
ActiveDocument.Select
' With Selection.Find
' .ClearFormatting
' .text = "]"
' With .Replacement
' .ClearFormatting
' .text = "U+0005D"
' End With
' .Execute Replace:=wdReplaceAll
' End With
' With Selection.Find
' .ClearFormatting
' .text = "["
' With .Replacement
' .ClearFormatting
' .text = "U+0005B"
' End With
' .Execute Replace:=wdReplaceAll
' End With
With Selection.Find
.ClearFormatting
.text = "%"
With .Replacement
.ClearFormatting
.text = "\%"
End With
.Execute Replace:=wdReplaceAll
End With
ActiveDocument.Select
With Selection.Find
.ClearFormatting
.text = "|"
With .Replacement
.ClearFormatting
.text = "\|"
End With
.Execute Replace:=wdReplaceAll
End With
' With Selection.Find
' .ClearFormatting
' .text = ":"
' With .Replacement
' .ClearFormatting
' .text = ":"
' End With
' .Execute Replace:=wdReplaceAll
' End With
With Selection.Find
.ClearFormatting
.text = "{"
With .Replacement
.ClearFormatting
.text = "\{"
End With
.Execute Replace:=wdReplaceAll
End With
With Selection.Find
.ClearFormatting
.text = "@"
With .Replacement
.ClearFormatting
.text = "\@"
End With
.Execute Replace:=wdReplaceAll
End With
With Selection.Find
.ClearFormatting
.text = "#"
With .Replacement
.ClearFormatting
.text = "#"
End With
.Execute Replace:=wdReplaceAll
End With
With Selection.Find
.ClearFormatting
.text = "*"
With .Replacement
.ClearFormatting
.text = "*"
End With
.Execute Replace:=wdReplaceAll
End With
End Sub
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot, Brock! Much appreciated
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.