I am not able to access empty paragraphs
I have problem in VBScript with accessing paragraphs with no contents inside of table cells.
Here is a snippet of my code (Row is the table row I am working on):
For Each Cell in Row.Cells
For Each Paragraph In Cell.Paragraphs
' Do something with Paragraph
Next
Next
This only gives me the paragraphs which contain some text. If they are empty, I don't get access to them at all (Cell.Paragraphs.Count = 0). When I have the document in InDesign, each cell does have a paragraph style inside of if, and I only have to write one character in the cell to get it to work, but as soon as I delete the last character, the paragraph becomes inaccessible from the script.
My aim is to replace the text within each paragraph with content from a database no matter what the paragraph might already contain. I cannot just create new paragraphs, because I use the paragraph style of the existing paragraphs to determine what text from the database goes where.