Hi all,
I have a project that needs to generate a letter for client information. I am using VFP 9 and Word 2013
The letter format is as follows:
Date
Salutation
Body
Account Information ( 2-3 lines ) varying between 1 and 30 accounts
Closing
Signature Graphic
Signature block
I know the Body of the letters stops at line number 25 or 26.
Account information itself could vary from 2 to 3 lines. And I can have any number of accounts, current max is 28.
If there is a 3rd account, then the Closing, Signature Graphic and Signature Block needs to go on the next page otherwise it is split over the first and second pages. Does not look professional.
My challenge is how do I find the current line number in the Word document so I can determine when to place the Closing and signatures stuff on the next page.
I cannot use a VFP variable because the salutation could vary in lengths from 4 to 5 lines. Account information could vary between 2 and 4 lines.
i need a way to count the lines of text as I write them to the word document. This count will determine what I do next.
I use oRange.InsertAfter('text') to write the text.
oWord.SELECTION.EndKey(wdStory) to go to the end of the page.
If any of that helps.
Thanks in advance.
I have a project that needs to generate a letter for client information. I am using VFP 9 and Word 2013
The letter format is as follows:
Date
Salutation
Body
Account Information ( 2-3 lines ) varying between 1 and 30 accounts
Closing
Signature Graphic
Signature block
I know the Body of the letters stops at line number 25 or 26.
Account information itself could vary from 2 to 3 lines. And I can have any number of accounts, current max is 28.
If there is a 3rd account, then the Closing, Signature Graphic and Signature Block needs to go on the next page otherwise it is split over the first and second pages. Does not look professional.
My challenge is how do I find the current line number in the Word document so I can determine when to place the Closing and signatures stuff on the next page.
I cannot use a VFP variable because the salutation could vary in lengths from 4 to 5 lines. Account information could vary between 2 and 4 lines.
i need a way to count the lines of text as I write them to the word document. This count will determine what I do next.
I use oRange.InsertAfter('text') to write the text.
oWord.SELECTION.EndKey(wdStory) to go to the end of the page.
If any of that helps.
Thanks in advance.