Results 1 to 3 of 3
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Stop ASK field from asking? (Word97/SR2)

    <P ID="edit" class=small>(Edited by jscher2000 on 17-Mar-03 19:24. Fixed text wrapping in PRE tags. Chris, you should know better!!)</P>About four years ago I remember populating a document with {ASK} fields and being able to inhibit Word from popping-up the input box at the time I (programmatically) inserted the {ASK}, but for the life of me I can't find in the Help files how to do it.

    I have a (cute!) macro that replaces certain text in the document with {bookmark} throughout the document. For each unique string with which I am concerned, I must insert an {ASK} field, perhaps seven of them per document.

    As the code (below) to insert the field is run, I get the user-prompt AS IF I'd just selected all the document and updated the fields.


    I'm SURE I was able to inhibit this, maybe as far back as Word6, but how?

    <pre>Public Function InsertASKField(strText As String)
    Selection.HomeKey Unit:=wdStory
    Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldAsk, Text:=strText, _
    PreserveFormatting:=True
    End Function</pre>


  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: Stop ASK field from asking? (Word97/SR2)

    Chris,
    Instead of indicating the text with the add method, create an empty field, then add the type and text to the selection object:

    Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, PreserveFormatting:=False
    Selection.TypeText Text:="ASK " & strText
    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
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Stop ASK field from asking? (Word97/SR2)

    > create an empty field, then add the type and text

    Kevin, Thanks. This works. I guess it works because Word keeps an eye on Inserted fields, and activates the prompt when it seems me Inserting an Add, but not when it sees me Inserting an empty field.

    I'd love to know what (if my memory is correct) it was I did at the head of the document to inhibit all this, though. Not urgent. Just bugging me that I think I had a solution; might have been Word6 .....

Posting Permissions

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