dcsimg
Results 1 to 4 of 4

Thread: Help debug a shape removal/replacement macro?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2005
    Posts
    103

    Help debug a shape removal/replacement macro?

    I've written a couple of Word macros (with some help from forum members, thanks again ) to remove and then replace all the text from textboxes in a document.

    Step 1 - extract all text from textboxes, along with the shape ID and paste to a document
    Step 2 - translate this text
    Step 3 - replace the translated text in the textboxes.

    The macros compile and run fine, and seem to work properly, but when I check, the strings have often been copied to the incorrect boxes. I've debugged it at length, but can't quite understand what's going wrong. If anyone's interested in a little puzzle and/or feels like helping, that would be great. The only thing I can think of is something to do with grouped objects, but it's only a vague notion of a possible problem.

    If anyone wants to have a look, I've attached the macros (in text format) and a sample document.

    To test it, you'd need to
    1. run the ExtractTextboxes macro which creates a DOC file beginning with extra_
    2. "translate" the middle column (black text), i.e. just add a few letters to the beginning of each string
    3. run the ReplaceTextBoxes macro to copy these strings back in
    4. figure out why the strings are not being copied to the place they should be. In order to know this, it's probably necessary to keep a copy of the original DOC and compare the textbox text in each.

    Cheers,
    P
    Attached Files Attached Files

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,135

    Re: Help debug a shape removal/replacement macro?

    You may have a better luck in VBA Forum .

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2005
    Posts
    103

    Re: Help debug a shape removal/replacement macro?

    Oh, I should probably have gone there a long time ago! Can someone move this?

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,717

    Re: Help debug a shape removal/replacement macro?

    i have been playing with your docment, but i will need more insrruction what it is supposed to do

    pm me

    pete

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width