Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Silicon Valley, California, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Show Dialog with Different Defaults

    Hi Everbody,

    In Word 2000, I attached the following code block to a toolbar button. The idea is, when the user clicks the button, they get the insert cross reference dialog, with various settings already set. According to the help file, this code should work. However, when I click the button, either I get the standard defaults for Word, or I get the last settings that I chose manually when I used the dialog last. What gives? Thanks!

    With Dialogs(wdDialogInsertCrossReference)
    .ReferenceType = "Numbered item"
    .ReferenceKind = wdNumberFullContext
    .InsertAsHyperlink = False
    .Update
    .Show
    End With

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Show Dialog with Different Defaults

    Jim,

    As long as the items exist in the document, your code should work. Except, take out the .Update. I don't see why you need that.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Silicon Valley, California, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Show Dialog with Different Defaults

    Of course, I agree it should work. There is no indication in any of the help to the contrary, nor is there any obvious reason why it should not work. However, "should work" and "actually work" are two different beasts!

    I agree, the Update item is not really necessary, I just wanted to make sure the list contained the absolute latest-and-greatest.

    Thanks for the reply!

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Show Dialog with Different Defaults

    Jim,

    I forgot to mention that I tried the code and it worked fine for me (Word 97 SR-2). I switched between bookmark items and footnote items in the code and the dialog displayed them fine. Sounds like weirdnessville.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Show Dialog with Different Defaults

    Kevin, I couldn't get it to work in Word2000 (SR-0), if the settings were anything other than those in the macro. If you change those drop downs and "Cancel" and then run the macro, it does not seem to pre-set the defaults the way Jim wants. Yours works?

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Show Dialog with Different Defaults

    Hummm. Now that I try it again, it does NOT work! I thought I had programmatically changed the values in the drop down. I can't even get that to work now.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  7. #7
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Show Dialog with Different Defaults

    Me three. Comments on <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=wrd&Number=30053>the Word board</A>.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •