Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Amdious Amdious is offline
external usenet poster
 
Posts: 3
Default Field codes: MergeField field RTF format problem

Hello,
I'm trying to figure out why something changed from Word 97 to Word 2003.
I'm inserting a basic MergeField into a Word .doc file contained within a
formatted line.

ie.
Why does MergeField «TEST» Kill the tab in WordPad

I have a left indent before the "Why" so I get a \li720 for the format of
"Why does..." and when I insert the «TEST» mergefield in appends a \sectd to
the end of the field keyword section that terminates the formatting and if I
open the file in WordPad the left indent is removed.

ie.

Why does MergeField «TEST» Kill the tab in WordPad


It's simple enough to reproduce by creating a new file, move the left indent
margin to the right, write some words, insert the MergeField write more
words, then save the file as RTF. Open the file in WordPad and the \liN will
not be recognized. I tried the same thing in Word 97 and the \sectd is NOT
applied to the end of the MergeField. I believe Office 2000 will not apply
the \sectd either. The file looks fine in Word, but not in WordPad. I'm
guessing the \sectd was applied on purpose, but I need to know why and how to
have it removed such that I can retain the line formatting.

Thank you in advance.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Field codes: MergeField field RTF format problem

Just a couiple of guesses. Word 2003 could be trying to cope with the
possibility that some fields (particularly INCLUDETEXT and AUTOTEXT) might
insert a section break and the \sectd is there to try to re-impose the
section formatting that existed prior to the field. Or it may be something
to do with the possibility that a MERGEFIELD might insert RTL text into an
otherwise LTR paragraph (or vice versa).

I have to say I've only looked at the RTF encoding to try to understand or
solve very specific problems so do not have good instincts as to why you
might need a \sectd.
--
Peter Jamieson
http://tips.pjmsn.me.uk

"Amdious" wrote in message
...
Hello,
I'm trying to figure out why something changed from Word 97 to Word 2003.
I'm inserting a basic MergeField into a Word .doc file contained within a
formatted line.

ie.
Why does MergeField «TEST» Kill the tab in WordPad

I have a left indent before the "Why" so I get a \li720 for the format of
"Why does..." and when I insert the «TEST» mergefield in appends a \sectd
to
the end of the field keyword section that terminates the formatting and if
I
open the file in WordPad the left indent is removed.

ie.

Why does MergeField «TEST» Kill the tab in WordPad


It's simple enough to reproduce by creating a new file, move the left
indent
margin to the right, write some words, insert the MergeField write more
words, then save the file as RTF. Open the file in WordPad and the \liN
will
not be recognized. I tried the same thing in Word 97 and the \sectd is
NOT
applied to the end of the MergeField. I believe Office 2000 will not
apply
the \sectd either. The file looks fine in Word, but not in WordPad. I'm
guessing the \sectd was applied on purpose, but I need to know why and how
to
have it removed such that I can retain the line formatting.

Thank you in advance.


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Amdious Amdious is offline
external usenet poster
 
Posts: 3
Default Field codes: MergeField field RTF format problem

Thanks. That'll give me something to investigate for figuring out the "Why"
part of the problem. Any ideas on how to turn it off and get it to behave
like the prior versions of Word?
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Field codes: MergeField field RTF format problem

No, sorry. If I had to do it, I suppose I would try to work out some way to
discard the entire \sectd, but I suspect that's not at all trivial. None of
the obvious things (changing compatibility options for the document before
saving, for example) seems to make any difference.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Amdious" wrote in message
...
Thanks. That'll give me something to investigate for figuring out the
"Why"
part of the problem. Any ideas on how to turn it off and get it to behave
like the prior versions of Word?


  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Amdious Amdious is offline
external usenet poster
 
Posts: 3
Default Field codes: MergeField field RTF format problem

Yeah, I figured it was going to be a fun problem. I'm going to contact
Microsoft and try to get an explanation for the change from Word 2000. I'm
working on an application that prints RTF files using the riched20.dll and I
have complaints that it doesn't print the same as Word 2003. It seems that
Word 2003 has special logic to detect this change which I'd rather not have
to implement. I'm trying to get an explanation or configuration change for
Word 2003 rather than implement a heuristic to remove the \sectd directly
after the \field RTF block before sending the RTF to the printer. I really
don't want to take that route, since it seems a little hackarific.

Thanks for the help though! I'm glad to know it wasn't something simple that
I had overlooked! I'll post a solution if I do get one. Otherwise assume I
did the heuristic. Haha.
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
Can you remove words from a mergefield using field codes? ZeonAutonomy Mailmerge 2 November 1st 06 07:05 PM
Saving word document with field results not field codes Cambdoc Microsoft Word Help 2 July 14th 06 10:51 AM
Use Mergefield within text in if-field Christine Mailmerge 1 November 14th 05 05:16 AM
Mergefield Two Dates One Field PBC Mailmerge 1 September 15th 05 11:51 PM
Imbedded MERGEFIELD in IF/ELSE/THEN field Rich Mailmerge 2 April 19th 05 01:14 PM


All times are GMT +1. The time now is 06:46 AM.

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

About Us

"It's about Microsoft Word"