Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. programmerinthedark

    using Find in a vba macro

    Hi Macropod, Yes, this code works, and the only thing I had to change was the .end setting. I needed 7 characters after the string, so that I could pick up some stuff after it, if it existed. However, this causes a slight problem if you have two matching strings which may be on the same line...
  2. programmerinthedark

    using Find in a vba macro

    Hi Macropod, I apologize for not using code tags. I'm blind (hence the handle), and didn't spot the "Code" tag there. Now I'm aware of it, I'll use it. As to the code, I'll probably use an if statement so that only footnotes and maintext are processed. About to try it. Best, PID.
  3. programmerinthedark

    using Find in a vba macro

    Hmm, Confused. Sorry. Best, PID.
  4. programmerinthedark

    using Find in a vba macro

    Hi Macropod, Here is the code: For intRangeSelect = 1 To 2 If intRangeSelect = 1 Then ActiveDocument.StoryRanges(wdMainTextStory).Select Else ActiveDocument.StoryRanges(wdFootnotesStory).Select End If With Selection.Find .ClearFormatting .Text = strFindText .Replacement.Text = "" .Forward = True...
  5. programmerinthedark

    using Find in a vba macro

    Hi again Macropod et al, Everything works fine now but... The macro searches the main document with no problem, but I've got a loop so that once it has searched the main document, the selection is set to the Footnotes range. Having inserted this code, it gets into a loop. Having stuck some...
  6. programmerinthedark

    using Find in a vba macro

    Thanks MP, I throw my hands up in horror. Various bits there I should have known, and I've stored your code in my snippets folder. Best PID.
  7. programmerinthedark

    using Find in a vba macro

    Hi again, At the risk of becoming boring, there seems to be a problem with the way I'm referring to things in this macro. Consider the following: set myrange=activedocument.storyranges(wdmaintextstory) Do While blnFound = True myRange.Find.ClearFormatting With myRange.Find .Text = strFindText...
  8. programmerinthedark

    How to map XML columns in a Excel spreadsheet using VBA

    Hi again, The importxml method is probably the way I'd go, but if you are using office 2003 or higher, there already exist tools that will help you, and take most of the donkey work out of the project. go to...
  9. programmerinthedark

    How to map XML columns in a Excel spreadsheet using VBA

    Hi, You'll need to look in the vba help at the ImportXML method. Having done that, you'll need to look at the xmlmap object, and make sure that you have your schema set correctly. Once you've done that, the whole process should be fairly straightforward. As to the refresh button, you just need...
  10. programmerinthedark

    using Find in a vba macro

    Thanks very much for this very helpful post. It has opened a tiny door in my memory, and I'm in the process of implementing (with some small changes) the offered code.
  11. programmerinthedark

    using Find in a vba macro

    Hello, I hope someone out there can help, as this particular problem is driving me mad. I've been asked to write a customized index builder for ms word 2003. The words I'm having to look for are contained in an array, and I use the Find command to look through the document. All was fine, until I...

Part and Inventory Search

Back
Top