Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
INCLUDETEXT field problem witht Word 2007
Hello,
I manage to include text from a text file in my word document with the following RTF field statement. However I had to update manually the field (with F9) to update the field and make the text appear after having oppened the word file. I was using Word 2003 and everything was fine, but when switching to word 2007, the text was not loaded anymore even after a field update (still with F9)... --------------------------------------------------- \pard\ql{\field{\*\fldinst { INCLUDETEXT "C:/data/MyText.txt" \\! \\* MERGEFORMAT }}} --------------------------------------------------- I am not sure about the use of the switches ... \\! \\* MERGEFORMAT any ideas ? Thanks, PB |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
INCLUDETEXT field problem witht Word 2007
However I had to update manually the field (with F9) to update the
field and make the text appear after having oppened the word file. This has been standard behaviour in Word for quite a long time - it's a "security feature" \pard\ql{\field{\*\fldinst { INCLUDETEXT "C:/data/MyText.txt" \\! \\* MERGEFORMAT }}} I am not sure about the use of the switches ... \\! \\* MERGEFORMAT I would certainly get rid of the \\! (which would lock the result) and probably the \\* MERGEFORMAT It's just possible that Word 2007 requires one or both of the \fldedit and \fldrslt keywords, but I doubt it You may also need to replace the "/" characters by "\\\\" (double because \ is the escape character for \ in rtf, and doubled again because you need double-backslashes in pathname literals in the field code iin Word itself, i.e. \pard\ql{\field{\fldedit{\*\fldinst{ INCLUDETEXT "C:\\\\data\\\\MyText.txt" }}} See how that goes... Peter Jamieson http://tips.pjmsn.me.uk wrote: Hello, I manage to include text from a text file in my word document with the following RTF field statement. However I had to update manually the field (with F9) to update the field and make the text appear after having oppened the word file. I was using Word 2003 and everything was fine, but when switching to word 2007, the text was not loaded anymore even after a field update (still with F9)... --------------------------------------------------- \pard\ql{\field{\*\fldinst { INCLUDETEXT "C:/data/MyText.txt" \\! \\* MERGEFORMAT }}} --------------------------------------------------- I am not sure about the use of the switches ... \\! \\* MERGEFORMAT any ideas ? Thanks, PB |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
INCLUDETEXT field problem witht Word 2007
Hi Peter,
If the source document is protected for forms, the \! switch will be needed. -- Cheers macropod [Microsoft MVP - Word] "Peter Jamieson" wrote in message ... However I had to update manually the field (with F9) to update the field and make the text appear after having oppened the word file. This has been standard behaviour in Word for quite a long time - it's a "security feature" \pard\ql{\field{\*\fldinst { INCLUDETEXT "C:/data/MyText.txt" \\! \\* MERGEFORMAT }}} I am not sure about the use of the switches ... \\! \\* MERGEFORMAT I would certainly get rid of the \\! (which would lock the result) and probably the \\* MERGEFORMAT It's just possible that Word 2007 requires one or both of the \fldedit and \fldrslt keywords, but I doubt it You may also need to replace the "/" characters by "\\\\" (double because \ is the escape character for \ in rtf, and doubled again because you need double-backslashes in pathname literals in the field code iin Word itself, i.e. \pard\ql{\field{\fldedit{\*\fldinst{ INCLUDETEXT "C:\\\\data\\\\MyText.txt" }}} See how that goes... Peter Jamieson http://tips.pjmsn.me.uk wrote: Hello, I manage to include text from a text file in my word document with the following RTF field statement. However I had to update manually the field (with F9) to update the field and make the text appear after having oppened the word file. I was using Word 2003 and everything was fine, but when switching to word 2007, the text was not loaded anymore even after a field update (still with F9)... --------------------------------------------------- \pard\ql{\field{\*\fldinst { INCLUDETEXT "C:/data/MyText.txt" \\! \\* MERGEFORMAT }}} --------------------------------------------------- I am not sure about the use of the switches ... \\! \\* MERGEFORMAT any ideas ? Thanks, PB |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
INCLUDETEXT field problem witht Word 2007
Thanks.
Now I can check both versions, it looks as if the only thing that really needs to change is the "/" separators in the pathname, which appear to work in Word 2003 but not Word 2007, to \\\\ as that appears to work in both versions - assuming that there is no additional OS-version related effect. Peter Jamieson http://tips.pjmsn.me.uk macropod wrote: Hi Peter, If the source document is protected for forms, the \! switch will be needed. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
include text from form field in includetext field | Microsoft Word Help | |||
Can a linked includetext field update if it's a form field | Microsoft Word Help | |||
Includetext field does not display form field bookmark | Microsoft Word Help | |||
includetext field in word to import excel work sheet | Mailmerge | |||
Word 2002 - problem wih linked items in INCLUDETEXT | Formatting Long Documents |