Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
[email protected] pierre0102@gmail.com is offline
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
include text from form field in includetext field Horatio J. Bilge, Jr. Microsoft Word Help 2 February 12th 09 08:00 PM
Can a linked includetext field update if it's a form field Sharon in Florida[_2_] Microsoft Word Help 1 March 3rd 08 01:36 PM
Includetext field does not display form field bookmark Trudie Microsoft Word Help 0 November 10th 05 02:02 PM
includetext field in word to import excel work sheet MandyK Mailmerge 2 September 8th 05 12:40 PM
Word 2002 - problem wih linked items in INCLUDETEXT Michael Formatting Long Documents 13 May 30th 05 02:45 PM


All times are GMT +1. The time now is 05:10 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"