I am a PHP programmer with no knowledge on VB, so I apologize for my intrusion :).
What I need is to split a .doc file with N pages into N different documents, using the first word of each page as the name of the documents. In php it's been kind of an impossible mission but I found this threat where it explains how to do it by means of a word macro
I found the lines where the macro gets the name of each generated document and saves it:
strNewFileName = Replace(docMultiple.FullName, ".doc", "_" & Right$("000" & iCurrentPage, 4) & ".doc")
docSingle.SaveAs strNewFileName 'save the new single-paged document
However I can't even do the (apparently) very little modification needed to change this so the file is saved with the first word of the page as its name.
Anybody would be so kind to help me with this?
Thanks in advance