Hi
I’m having an issue when using Range.Replace to replace text in a Word Template. If the replacement string doesn’t contain any line breaks and string spans multiple pages the Save as PDF failes with and exception:
System.InvalidOperationException: Stack empty.
at System.Collections.Stack.Pop()
Is there any way around this? Do I need to insert a line break if there is none?
Regards,
Oskar