I want to extract all formula's from a document. The problem arises when I need to extract formulas from tables.
I use a loop :
dim parTeller as Paragraph
dim docInput as Document
for each parTeller in docInput
next parTeller
and check each paragraph for embedded objects:
For Each objCounter In parTeller.Range.Fields
If objectTeller.Type = wdFieldEmbed Then
FieldToDoc docExport, objCounter
endif
Next
Somehow when Word gets to the last paragraph of a cell he counts all fields in the cell instead of the ones in the paragraph of the cell. So now he extracts the formula double.
I need to loop through the paragraphs because I sometimes need to copy additional information.
Does anyone have a solution or way around this?
Martijn Peeters
I use a loop :
dim parTeller as Paragraph
dim docInput as Document
for each parTeller in docInput
next parTeller
and check each paragraph for embedded objects:
For Each objCounter In parTeller.Range.Fields
If objectTeller.Type = wdFieldEmbed Then
FieldToDoc docExport, objCounter
endif
Next
Somehow when Word gets to the last paragraph of a cell he counts all fields in the cell instead of the ones in the paragraph of the cell. So now he extracts the formula double.
I need to loop through the paragraphs because I sometimes need to copy additional information.
Does anyone have a solution or way around this?
Martijn Peeters