From: Doug Robbins - Word MVP on
As I had mentioned, my experience with Word 2007 is that the Insert Cross
Reference dialog behaves better than it did in previous versions where it
annoyed the hell out of me when I left the dialog open and wanted to insert
another cross reference, the focus would return to the top of the list.

As an alternative to using that dialog, you might consider creating a
userform that contained a listbox to display the type of reference items and
code to insert a cross reference based on the item selected from the
listbox.

Such a listbox can be populated using the following code in the initialize
statement of the userform

Dim afield As Field
Dim caplist As String
Dim i As Long
caplist = ""
For Each afield In ActiveDocument.Fields
If afield.Type = wdFieldSequence And InStr(afield.Code, "Figure") > 0
Then
If caplist = "" Then
caplist = "Figure " & afield.Result
Else
caplist = caplist & "|Figure " & afield.Result
End If
End If
Next afield
lstCap.List = Split(caplist, "|")


--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.
"Brian Murphy" <bmurphy(a)xlrotor.com> wrote in message
news:d290f3a2-5525-49a6-925c-51b9fefd3bad(a)x31g2000yqx.googlegroups.com...
> Well darn!
> Do you have both Footnote and Figure in your list of available
> reference types?
>
> I have MSO SP2 from the following download
> www.microsoft.com/downloads/details.aspx?FamilyID=b444bf18-79ea-46c6-8a81-9db49b4ab6e5&displaylang=en
> Word tells me I've got
> Word 2007 (12.0.6425.1000) SP2 MSO (12.0.6425.1000)
>
> How can I get build 6514 of Word? I don't really expect it to make
> any difference, but you never know.
>
> When I manually do Insert/Cross Reference, I have to type "fef" slowly
> to move the selection from Footnote, to Equation, to Figure. If I
> type the "fef" quickly, the selection stays on Footnote.
>
> Something wierd is going on. I've tried it on three different
> computers with the same result. Grrrr!
>
> Brian

From: Jonathan West on
Hi Brian

It may be that the problem is that you are using Word 2007 under Windows
Vista. Sendkeys is broken under Vista, which as far as I can tell appears to
be a deliberate act on the part of Microsoft. Goodness only knows why.

You might want to try using Karl Peterson's SendKeys replacement, which is
available here.
http://vb.mvps.org/samples/SendInput/

It is a module that you can drop into your VBA project and have it work
exactly as Sendkeys used to.


--
Regards
Jonathan West





"Brian Murphy" <bmurphy(a)xlrotor.com> wrote in message
news:d290f3a2-5525-49a6-925c-51b9fefd3bad(a)x31g2000yqx.googlegroups.com...
> Well darn!
> Do you have both Footnote and Figure in your list of available
> reference types?
>
> I have MSO SP2 from the following download
> www.microsoft.com/downloads/details.aspx?FamilyID=b444bf18-79ea-46c6-8a81-9db49b4ab6e5&displaylang=en
> Word tells me I've got
> Word 2007 (12.0.6425.1000) SP2 MSO (12.0.6425.1000)
>
> How can I get build 6514 of Word? I don't really expect it to make
> any difference, but you never know.
>
> When I manually do Insert/Cross Reference, I have to type "fef" slowly
> to move the selection from Footnote, to Equation, to Figure. If I
> type the "fef" quickly, the selection stays on Footnote.
>
> Something wierd is going on. I've tried it on three different
> computers with the same result. Grrrr!
>
> Brian

From: Brian Murphy on
Thank you Doug and Jonathan for the suggestions.

I've been trying really hard to avoid resorting to a custom userform,
but it's just about come to that.

I've been testing in both XP and Vista, and I haven't noticed any
difference in behavior for my particular macros.

I'm sure you know this, but I'm trying to display the Insert Cross
Reference dialog with my choice of Reference Type pre-selected. So
that the user can select the item to be cross-referenced.

I think I'll give SendInput a try, but I'm not too optimistic. Then
it'll have to be a userform.

Have either of you tried Word 2007 in Windows 7? I have not. More
fun in the sun.

Brian

If you want to try or look at my code yourself, download these
files.
www.rotordynamics.org/public/murf_macros_for_Word_Documentation.pdf
www.rotordynamics.org/public/murf_macros.dot
I create lots of engineering reports and technical papers, and these
macros help me a lot.
If all you want to do is look at the code, put murf_macros.dot on the
desktop and use File/Open from inside Word to open it.
From: Doug Robbins - Word MVP on
It's no more fun (nor less) in Windows 7 than it was in Vista of XP

--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.
"Brian Murphy" <bmurphy(a)xlrotor.com> wrote in message
news:75b15c67-870e-43a0-85a5-cb3812749bc1(a)j4g2000yqe.googlegroups.com...
> Thank you Doug and Jonathan for the suggestions.
>
> I've been trying really hard to avoid resorting to a custom userform,
> but it's just about come to that.
>
> I've been testing in both XP and Vista, and I haven't noticed any
> difference in behavior for my particular macros.
>
> I'm sure you know this, but I'm trying to display the Insert Cross
> Reference dialog with my choice of Reference Type pre-selected. So
> that the user can select the item to be cross-referenced.
>
> I think I'll give SendInput a try, but I'm not too optimistic. Then
> it'll have to be a userform.
>
> Have either of you tried Word 2007 in Windows 7? I have not. More
> fun in the sun.
>
> Brian
>
> If you want to try or look at my code yourself, download these
> files.
> www.rotordynamics.org/public/murf_macros_for_Word_Documentation.pdf
> www.rotordynamics.org/public/murf_macros.dot
> I create lots of engineering reports and technical papers, and these
> macros help me a lot.
> If all you want to do is look at the code, put murf_macros.dot on the
> desktop and use File/Open from inside Word to open it.