On 2009-05-09 02:14:12 -0600, "macropod" <
[email protected]> said:
OK, Back late to the party...
Thanks for chiming in John. Believe me, you are preaching to the choir
as I have been a programmer for IBM 13 yrs, and I very much know the
pitfalls of type-os. I've been bitten by them too many times to
mention, But that is not the problem here.
When I generate the macro using insert field and get the pop-up window
to create an ordinal date, the following code is generated:
{ CREATEDATE \@ d \*Ordinal \* MERGEFORMAT }
However, if I use CMD-F9 to create a field and enter (copy/paste) the
exact Code, when I hit Opt-F9 to execute the code, the code simply
disappears: no error, no warnings, no ordinal date.... nada, white. I
press Opt-F9 again and the code reappears. I also have invisibles
turned on and the end of line moves right back to the start of the line
and is not displaced by a white text on white paper.
As in the original generated code, I have verified that there is a
single space after the start brace, and a single space before the end
brace. Since I copied (CMD-C) the generated code and pasted (CMD-V) it
directly between the new braces, there is no possibility of a type-o.
Although I have coded in well over 100 different language, including
VB, this is my first endeavor into Word fields, and at first sight, the
syntax is straight forward, but I am having a dickens of a time
implementing any code that is NOT generated by Word.
I really appreciate both of your time and patience helping me figure
this out. At this point, implementing nested code is impossible.
--
Thanks
Gary at thumbprints dot ca
Edmonton, Alberta, Canada
Hi John,
Thanks for joining the discussion.
I believe the OP is having problems getting the fields to update, among
other things. On my reading, it seems when he presses F9, only one of
the fields in a set of nested fields updates.
Like many Word users, the OP believes fields are macros (cf "I have
tried to code in code in new macros using CMD-F9"), but that's not
especially important. As you say, careful attention to detail is the
key.
--
Cheers
macropod
[Microsoft MVP - Word]
Hi Gary:
There's no "Trick" to it, other than "type carefully"
You are writing computer code. Admittedly, it's simple code, but the
computer ain't that smart. The spelling is critical,
character-for-character, and the spaces or absence of spaces are all
important.
And you must pay attention to the "matching" or "nesting" of the various
sets of Field Bounding Characters (which, as you correctly point out, are
'not' curly brackets).
However, if Word does not "recognise" the code, it will normally return an
error message when you update the field.
So you need to show us the code you are typing, and maybe we can help.
Cheers
On 8/05/09 9:06 PM, in article 2009050805064316807-gary@NOSPAMinvalid,
On 2009-05-01 00:25:53 -0600, "macropod" <
[email protected]> said:
Hi Gary,
If you think that's a challenge, try pressing Option-F9 and looking at
the coding for some of the other fields ...
Thanks macropod, I tried the Opt-F9 and now think that my head might
explode!!!
I have tried to code in new macros using CMD-F9 so that the funky curly
brackets are inserted and added code in between the bracket, but I
can't get anything to work, even if I cut and past from the example.
The only way I could get the code to work is if I use the menu command
for Insert Field, which is fine for single level macros, but won't work
at all for nested macros like your example. I ended up just having a
field for just the month, another field for the ordinal day, and a 3rd
for the year.
Is there a trick to getting word to recognize the nested field code or
am I just missing something obvious, except to me?
--
Don't wait for your answer, click here:
http://www.word.mvps.org/
Please reply in the group. Please do NOT email me unless I ask you to.
John McGhie, Microsoft MVP, Word and Word:Mac
Sydney, Australia. mailto:
[email protected]