Hi Forum, is there a way to read a word Document and put the text into an other one via Automation? How can i get the value of for example a word or a sentence? I’ve searched the forum, but i found no solution or hint. Thanks in advance. Greetings, Frank
Solved by myself [:D]. You have to use WdDoc.Words.Item(i).text to get and put the Text of the i’th word. Just another question: How can i put an Enter or a Tab to a Word-Document? Greetings, FRank
Hi You can also use the “Range” Objekt to get the text of a Word Document, see also the Word VBA-Help for further details. To put an Enter maybe you can use the crlf string, i used it in Outlook Automation and it works fine: Name DataType Subtype Length CR Char LF Char CRLF Text 2 CR := 13; LF := 10; CRLF := STRSUBSTNO(’%1%2’,CR,LF);
Hi Bastian, it works fine, thanks a lot. Is there anybody, who knows how to put Tab? Thanks in advance. Greetings, Frank
CR, TAB, NEWLINE Char; CR := 13; // to have return LF := 10; // (idem) TAB := 9; // to have tabulation NEWLINE := 11; // to have line break salutations Patrick
Thanks patrick