Hay, I have problem with delete data from word. I wanna delete some kind of table from word. I save that data in one variable and I don’t know haw to delete that. Replace doesn’t working in this case. Please if someone know how to do that. Maybe with some hotkey? But when I try that I don’t know haw to say ok I wanna delete exactly that table.
Do one thing. If there is any fixed word before or after of the table then follow this steps.
-
Read entire word document and store it in a String variable say ‘wordText’.
-
Int before = wordText.IndexOf(“beforeWord”)+“beforeWord”.Length
-
Int after = wordText.IndexOf(“afterWord”)+“afterWord”.Length
-
String tableData = wordText.SubString(before,after-before)
-
String finalWord = wordText.Replace(tableData,“”)
1 Like
Isn’t working, I don’t know why.Proba.xaml (39.0 KB)
I used BalaReva word package to delete specific table.
It was working.