Home > Back-end >  C builder reads data and pictures in word document, form
C builder reads data and pictures in word document, form

Time:10-02

Question:
Existing a word document to programming with c + + buider tools, with ole technology to manipulate the word, due to the text word documents, pictures, tables, how to correctly extract the data? Hope to have a master can help to solve, it is better to post code, thank you!
Such as: read the text can use one-time read:
The Variant vSelect vSelection;
VSelect. OleProcedure (" Select ");
VSelection=vWordApp. OlePropertyGet (" Selection ");
But this way, all newline is ignored, the subsequent I will work for data extraction, you will have trouble, and the inside of the pictures cannot extract,

Hope everybody glad, thank you!

CodePudding user response:

Basically traversal paragraph, traversal operations such as images, you'd better provide your test documentation, and a simple description of the requirements, such as to extract which element content,

CodePudding user response:

Thanks for the support of demon elder brother, I on the Internet is very difficult to find some documents about Ole word operation,
But I have seen many posts you back, you of OLE technology is very proficient in,
A demon elder brother's help, I can certainly done, thank you very much demon elder brother!!!!!!
But I took half a day, don't know how to upload the word attachment?

CodePudding user response:

I will post data come directly, as follows:
The red part is to insert images and forms,
I demand is: can read the whole text according to the original format, including a newline, space, etc., and then run into the picture place can know his position, and pictures can save as a similar JPG format, form the inside of the part can read content,
Thank you again for demon elder brother!!!!!!!!!!!!!!!!!!! Worship!!!!!!!!!!


[question] real Numbers a and b on the number axis position as shown in figure, the reduction of [color=# FF0000] (here are the picture 1) for (),
(here are picture 2) A. - a, B. C - 3 a. 2 b + D. 2 b - a (this behavior 1 row four columns of a table, four options content respectively in four cell) to [answer] B
[resolution]
Test analysis: the figure shows b <0 a,
The (here are picture 3) the examination site: real
Comments: subject difficulty is low, mainly examines students grasp of the model and the real knowledge, determine the size of the relationship between a and b as the key to the problem solving, [/color]

CodePudding user response:

Your WORD document, can be used to locate elements have a bookmark or things like that? Or paragraph format standard?

CodePudding user response:

There is no use bookmarks, my idea is to read the text, and line by line, respectively, according to the label (for example, [the]) extract content, I want is to extract the topic in question, options, answer, parsing, item analysis, the examination site, reviews, etc., in the beginning there will be a logo, which in the picture, insert a path, indicating the location of the save picture as,
The example above is just one of the questions, the whole word document there will be a lot of questions, each question formats are similar, paragraphs, can to each entitled a paragraph,
On that color logo is a little mess, the new logo:
Thanks for demon elder brother reply and help, in the continuous attention, I add 60 points, thank you very much!!!!!

[question] real Numbers a and b on the number axis position as shown in figure, the reduction (here are picture 1) for (),
(here are picture 2)
A. - a, B. C - 3 a. 2 b + D. 2 b - a (this behavior 1 row four columns of a table, four options content respectively in four cell)
[the] B
[resolution]
Test analysis: the figure shows b <0 a,
The (here are picture 3)
The examination site: real
Comments: subject difficulty is low, mainly examines students grasp of the model and the real knowledge, determine the size of the relationship between a and b as the key to the problem solving,

CodePudding user response:

Look,
I tried to from the Excel process flow diagram (some arrows with text and table), read data, into ERP process chain, you need failure as a result, have time to also want to find opportunity to try again,

CodePudding user response:

So, you still send a Word presentation to my mailbox, time I help you to analyze,
Cbfans at 163 dot com

CodePudding user response:

Ok, I sent to you in the evening, it's not convenient use mailbox,
Thank you demon elder brother!!!!!!

CodePudding user response:

No help ah,,,

CodePudding user response:

I have also recently doing this, I did not even do a good job in the layout of the OLE now, open the word always fill the entire form, how to solve ah,

CodePudding user response:

I am in this, and what's a good way

CodePudding user response:

I didn't receive the mail? It's no wonder that a year and a half is not knot,
  • Related