![]() |
|
#1
|
|||
|
|||
![]()
Hei,
i have a manuscript in xml form and now wanna transfer its content to word for final version and spelling corrections. But i'd like to include the corrected parts back into the xml form of the document. Thus i'd like to know, wether there is an api for the spelling corrections that gives me suggestions for the wrong parts and allows me to write a little tool that allows it to gently correct the parts in the xml document. |
#2
|
|||
|
|||
![]()
If I'm understanding your problem, you created this xml file in some other package, and want to do a spell check, so want to open it in Word?
What happens if you simply paste your xml file into Word, and run the spell check as-is? If it's raw xml with open/close tags, maybe you can choose to ignore those during spell check, or add to dictionary. Not sure if this is helpful as you mentioned you want to create a tool to do this. If these ideas don't help, can you post a portion of your xml document you're talking about so we can take a look at how this might be done? |
#3
|
|||
|
|||
![]()
I guess the point is, that i only want to spell-check certain text-data in the xml file, not the other parts like the xml element names etc.
The xml goes some kind like Code:
<Book Title="Name of the book" SomeOtherAttributes="Some data"> <Series> <Part Title="First Part of the Book" SomeOtherAttributes="Some data"> <Chapter Title="First chapter" SomeOtherAttributes="Some data"> <Scene Title="Scene name" SomeOtherAttributes="Some data"> <p Title="Paragraph name" SomeOtherAttributes="Some data"> Once <b>uppon</b> a time ... </p> </Scene> </Chapter> </Part> <Series> <SomeOtherElements> Some other data </SomeOtherElements> </Book> This is why i finally dont use word for the spell check. |
#4
|
|||
|
|||
![]()
Hi Brian,
thanks for your response and yes you got me right i think. Just the problem is, i don't wanna have "manual" steps like copy and paste, creating word document etc. during the spell check The xml structure is not so simple and messing around with the xml code during the spell check would produce a lot of errors. This is why i was seeking for a fully automated solution. i was checking, wether i can use word-spell through the vba api but i doesnt seem to work in a gentle way. So finally i came to the solution using a online-service which provides http requests to check the spelling for a certain amount of text. So my data flow finally goes like: XML => WPF-GUI => HTML-API => WPF-GUI => XML => XSLT => HTML => WiN-Copy/Paste => WORD => PDF |
#5
|
||||
|
||||
![]()
You could, of course, open the xml file in Word in its raw format and limit the spell-check to the <p> elements. That can be done by setting the whole document's proofing to 'no-proofing', then using Find/Replace to allow proofing within the <p> elements, before saving the corrected file in its original format.
The problem, though, is that someone is going to have to decide on a case-by-case basis of what corrections, if any, to apply to anything Word considers a spelling error.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
![]()
If I were handed this problem, my first thought would be to solve it using Python. For a completely automated solution, one could potentially drag a bunch of files, or use a folder to run the script that spell checks what is between p tags. As Macropod mentioned, spell checking still requires a human to make sure all is ok.
|
![]() |
Tags |
spell check, vba |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Spelling check actions | harry | Word | 3 | 12-16-2019 10:40 PM |
Word does not check spelling | laqa | Word | 3 | 07-04-2019 06:19 PM |
![]() |
DavidA | Word | 4 | 07-14-2014 05:33 PM |
![]() |
ilcaa72 | Word VBA | 1 | 02-13-2014 12:15 PM |
Check spelling as you type | mixy | Outlook | 1 | 09-20-2010 08:53 AM |