• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 489
  • Last Modified:

Macro stopped working properly

I have a macro which uses a user form to find and replace foreign text in a very large Word file.  It worked fine in testing.  I took a break for a couple of days and after coming back to it it doesn't work.  It uses a Bookmark to mark the place in the text where it should start from (instead of searching the test from the beginning each time) and it basically gets stuck at that place now and doesn't search any further.

Could someone help me debug it?
0
Lucynka
Asked:
Lucynka
  • 21
  • 9
  • 4
  • +3
1 Solution
 
Bob LambersonSoftware EngineerCommented:
Would you be able to post the code?

Bob
0
 
LucynkaAuthor Commented:
Sure!  Here it is:


Private Sub ComboBox1_Change()
    If ComboBox1.Text = "Add a comment" Then
        objSentence.Collapse
        objSentence.Comments.Add objSentence.Sentences.Last, "This sentence needs revising"
        ActiveDocument.Bookmarks.Add "Lucynka", Range:=Selection.Range
    ElseIf ComboBox1.Text = "Edit the phrase" Then
        ActiveDocument.Bookmarks.Add "Lucynka", Range:=Selection.Range
        TextBox1.SetFocus
    End If
End Sub

Private Sub CommandButton1_Click()
    ComboBox1.Text = ""
    TextBox1.Text = ""
    TextBox2.Text = ""
         
             
             
             
    If TextBox3.Text = "" Then
        MsgBox "A new search term must be input.", vbExclamation, "No Search Term Error"
        TextBox3.SetFocus
        Exit Sub
    End If
         
             
    If ActiveDocument.Bookmarks.Exists("Lucynka") = True Then
        Selection.GoTo What:=wdGoToBookmark, Name:="Lucynka"
    Else
        ActiveDocument.Bookmarks.Add "Lucynka", Range:=ActiveDocument.Sentences.First
    End If
           
    Selection.Find.ClearFormatting
    y = ActiveDocument.Sentences.Count
   
    For x = 1 To y

        With Selection.Find
           x = y
            .Text = TextBox3.Text
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = True
            .MatchSoundsLike = False
            .MatchAllWordForms = False
           
        End With
        Selection.Find.Execute
       
       If Selection.Find.Found = False Then
       TextBox1.Text = "No match found"
       TextBox2.Text = "No match found"
       Exit Sub
    End If

        Do While InStr(1, Selection.Text, ".") > 0
           
            ActiveDocument.Bookmarks.Add "Lucynka", Range:=Selection.Sentences.Last
            Selection.GoTo What:=wdGoToBookmark, Name:="Lucynka"
           
            With Selection.Find
           
                .Text = TextBox3.Text
                .Replacement.Text = ""
                .Forward = True
                .Wrap = wdFindContinue
                .Format = False
                .MatchCase = False
                .MatchWholeWord = False
                .MatchWildcards = True
                .MatchSoundsLike = False
                .MatchAllWordForms = False
           
            End With
            Selection.Find.Execute
           
           If Selection.Find.Found = False Then
       TextBox1.Text = "No match found"
       TextBox2.Text = "No match found"
       Exit Sub
    End If

        Loop
       
        Set objSentence = Selection.Sentences.First
        strSentence = objSentence
       
             
        If Selection.Find.Found And InStr(1, Selection.Text, ".") = 0 Then
           
            Selection.Select
            ActiveDocument.Bookmarks.Add "Lucynka", Range:=Selection.Range
            TextBox1.Text = Selection.Text
            TextBox2.Text = strSentence
                               
       
        End If
         
       

    Next

End Sub

Private Sub CommandButton2_Click()
    Selection.Text = TextBox1.Text
    ComboBox1.Text = ""
End Sub

Private Sub UserForm_Activate()
    ComboBox1.AddItem ""
    ComboBox1.AddItem "Add a comment"
    ComboBox1.AddItem "Edit the phrase"
End Sub

0
 
Bob LambersonSoftware EngineerCommented:
Lucynka,
Need to know a couple more details.......
where are you defining variables like "objSentence" and what type are they defined as, what references do you have selected, and are all the functions in the form code.

Bob
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Robberbaron (robr)Commented:
Do you need to clear the bookmark so that there is no problem with adding new one next time ?
0
 
LucynkaAuthor Commented:


>>>where are you defining variables like "objSentence" and what type are they defined as,
This code was written for me.  I don't know enough about VB to write code.  I only create macros by recording them or by cutting and pasting code that has been written for me, if it's a simple modification.

This is a guess:
In Private Sub CommandButton1_Click()
Range:=ActiveDocument.Sentences.First

>>>what references do you have selected
I'm not sure how to answer these.  I type in my search phrase or word combinations in Text Box 3.  They differ from case to case.

>>and are all the functions in the form code.
Not sure I understand the question..  As I said, I' not a VB pro.


>> Do you need to clear the bookmark so that there is no problem with adding new one next time ?
I was told that I don't have to do that.  But when the problem started, I deleted the bookmark, closed Word, reloaded all the files, but it didn't help.  For some reason, though, today it's behaving differently, so it must have something to do with the files as I work on them.




0
 
LucynkaAuthor Commented:

Here is what it is doing today:

It doesn't get stuck on the first "Find", but when it finds one, it stays on it for a few seconds and then moves on, before I have a chance to select an option of click anything.  It does that only with one - it skips one and then rests on the next one it finds.  I'm very relieved that at least it's moving through the document, but of course I'd like to know why it wasn't before and why it's now skipping examples it obviously doesn't  like...
0
 
LucynkaAuthor Commented:
Now it's stopping at its first "Find" again...
0
 
LucynkaAuthor Commented:
I've tried another one of my macros I used with success before, and it's doing the same thing....  Should I post that one as well?  It's also using the bokmark.
0
 
edwardiiiCommented:
Howdy. I'm wondering, based on your comment that a formerly successful macro is not working properly--does this errant behavior occur on every document you use the macro on, or just one document?
0
 
LucynkaAuthor Commented:
I notice it when I work with my main file (I have only one I need it for), but I then turn to my small test file to check it out and it does the same thing.
0
 
edwardiiiCommented:
I couldn't get this code to run until I added the following to the form's General Declarations section (e.g. double-click your
UserForm and select "General" from the left-hand drop down menu):

     Option Explicit
     Dim objSentence As Range

Also add this to the top of CommandButton 1:

     Dim x, y as Integer
     Dim strSentence As String

At least by adding Option Explicit we'll fully control how values are assigned:)
0
 
LucynkaAuthor Commented:
>>>select "General" from the left-hand drop down menu):

I don't have the "General" option.  I have three labels, text boxes, combo box and user form under "Properties - User Form1".
0
 
LucynkaAuthor Commented:
>>>I don't have the "General" option.

I found it...  I'm learning...
0
 
LucynkaAuthor Commented:
It was working fine again for two days.  Today, I just tried it after turning my computer on and it's getting stuck again.  I might mention to you that I'm changing the name of my main Word file every day - but that should have no impact on anything, right?  It should work with any active document.

I've created a copy of my user form for testing and added the changes you gave me.

I'm getting a message
Run Time error 6
Overflow

0
 
LucynkaAuthor Commented:
I went back to the original user form and deleted the bookmark.  It then went to the second Find, but stopped again.  I deleted the bookmark again and it moved again.  So it's getting stuck at the bookmark.
0
 
LucynkaAuthor Commented:
It's been moving through a couple of finds before getting stuck, at which point I deleted the bookmark and it went for another couple of times.  But I just got a message that Word has insufficient memory and if I proceed, this action can't be undone, so I stopped it and got an error message "Run-Time error '4608'  Value out of range"
0
 
edwardiiiCommented:
It almost sounds like something is corrupting the code.  When we started on this project you were using macros; we moved you away from macros and to the Userform.  Aside from the code I've provided you, do have other macros loaded in these Word documents?  What is your process for the translating that you're doing (e.g. does someone give you a Word document to translate and you add the Userform/code; I'm not clear how you're doing this)?
0
 
Robberbaron (robr)Commented:
Insuffiecient memory could be a pointer to a loop continuing infinitely.....
0
 
LucynkaAuthor Commented:
>>>Insuffiecient memory could be a pointer to a loop continuing infinitely.....
It's caused by the code, no the other way around.  I have plenty of memory (over 1 gig, I think)

>>something is corrupting the code.
Yes!  I've used these macros and the user form without a problem before.  I cannot stop using the macros, becasue we haven't written code with a user form to replace all of them yet.

>>do have other macros loaded in these Word documents?
Yes, all of them do some type of a Find and replace.  Would you like me to paste the code of what I use the most?

>>What is your process for the translating that you're doing (e.g. does someone give you a Word document to translate and you add the Userform/code; I'm not clear how you're doing this)?
The main file is maintained only by me.  I make revisions to it every day.  But I also insert a lot of comments into it, all by either typing them in or pasting from other word documents (also generated by me), e-mails or text from certain websites (maybe that could be a problem???).

Just imagine as if you were writing a book - the text is all there and you are now re-reading it and inputting all kinds of corrections from your reading.  And you comment on those corrections for yourself so that you know why you changed something and have the back up for it in other files and in the comments.


0
 
LucynkaAuthor Commented:
By the way - my other macros are working fine.  Only the one where the bookmark is used and the user form are not.
0
 
edwardiiiCommented:
Regarding "Only the one where the bookmark is used and the user form are not", I have to ask--you originally had that code (before we put it into a userform) in a macro.  Is it possible that macro is still in your Word document and it's running along with the Userform code?  I remember you had the insufficient memory error in one of your previous questions and I posted a fix for it and it went away.  It's almost like you've got macro code running that's got older code it in, and that code is fighting with the userform code (that should work just fine).

Let's have you do a test.  Open a new Word document.  Go to Tools/Macros, and if there are any macros delete them.  Then do Alt-F11 and go through and make sure there is no macro code--we want a fresh, clean workbook.  Then add a userform with all the code you've posted above (with the variable declarations).  Finally, copy some foreign-language code from the Word document that's not working right and drop it onto the new Word document page.  Does the userform work right then?  If so, add each macro from the non-working Word doc to the new doc, and after you add each macro, test the new document again.  This will either show us which macro is problematic or it will result in a new Word doc with all coding functioning properly.
0
 
LucynkaAuthor Commented:
I've created a new Word document and dropped my entire text into it.  In the Macro section, I've selected only this document and then pasted a copy of my macro with the bookmark.  It didn't work - it went to the first occurrence at the bookmark and stopped.

I didn't test with the user form.  Is there an easy way to copy a user form itself?

Let me paste this macro.  Maybe it's the one that's causing the problem?

Here it is:

Sub FindAdvancedTest()
'
' FindAdvancedTest Macro
' Macro created 5/4/2005 by x
'

Dim x, y, z As Integer
    Dim objSentence As Range
    Dim strSentence As String
    Dim strPrompt As String
       
    If ActiveDocument.Bookmarks.Exists("Lucynka") = True Then
        Selection.GoTo What:=wdGoToBookmark, Name:="Lucynka"
    Else
        ActiveDocument.Bookmarks.Add "Lucynka", Range:=ActiveDocument.Sentences.First
    End If
           
    Selection.Find.ClearFormatting
    y = ActiveDocument.Sentences.Count
   
    For x = 1 To y

        With Selection.Find
           
            .Text = "<któr*>" & "[!.]*" & "<jak*>"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = True
            .MatchSoundsLike = False
            .MatchAllWordForms = False
           
        End With
        Selection.Find.Execute
       
        Do While InStr(1, Selection.Text, ".") > 0
           
            ActiveDocument.Bookmarks.Add "Lucynka", Range:=Selection.Sentences.Last
            Selection.GoTo What:=wdGoToBookmark, Name:="Lucynka"
           
            With Selection.Find
           
                .Text = "<któr*>" & "[!.]*" & "<jak*>"
                .Replacement.Text = ""
                .Forward = True
                .Wrap = wdFindContinue
                .Format = False
                .MatchCase = False
                .MatchWholeWord = False
                .MatchWildcards = True
                .MatchSoundsLike = False
                .MatchAllWordForms = False
           
            End With
            Selection.Find.Execute
           
        Loop
       
        Set objSentence = Selection.Sentences.First
        strSentence = objSentence
       
        z = 0
        z = InStr(1, Selection.Text, ".")
       
        If Selection.Find.Found And InStr(1, Selection.Text, ".") = 0 Then
           
            Selection.Select
            ActiveDocument.Bookmarks.Add "Lucynka", Range:=Selection.Range
            strPrompt = Selection & vbNewLine & _
                        "was found in Sentence:" & vbNewLine & _
                        strSentence & vbNewLine & vbNewLine & _
                        "Please enter one of the following choices:" & vbNewLine & _
                        vbTab & "1: To add a comment" & vbNewLine & _
                        vbTab & "2: To edit the phrase"
               
                Select Case InputBox(strPrompt)
                Case 1
                    Selection.Range.Collapse
                    objSentence.Comments.Add objSentence, "This sentence needs revising"
                    ActiveDocument.Bookmarks.Add "Lucynka", Range:=Selection.Range
                Case 2
                    Selection.Range.Text = InputBox("Please edit the text here", , Selection.Text)
                    ActiveDocument.Bookmarks.Add "Lucynka", Range:=Selection.Range
               
                End Select
                   
         End If

    Next

End Sub

0
 
edwardiiiCommented:
Okay.  To start, add "x=y" to the first "With Selection.Find":

     With Selection.Find
             x=y
            .Text = "<któr*>" & "[!.]*" & "<jak*>"

You can also delete:

     z=0
     z = InStr(1, Selection.Text, ".")

That's all I see that needs editing...

You can save your Userform by right-clicking on it in the left-hand Project/Forms window, selecting "Export File" and saving to your desktop (or location of choice).  Then from the new Word doc's MS Visual Basic window, right-click on the project name in the same left-hand project window and do "Import File"; navigate to where you saved the userform in the prior "Export" operation and you're done:)
0
 
LucynkaAuthor Commented:
I've made the changes and tested it on my test and "real" files.  It went for a few sentences and then stopped again.  Is there a limit to the sentences?  Does it give a number like 1000?  This is a huge file, although my test file was rather small.


This macro works:


Sub FindBasic()
'
' FindBasic Macro
' Macro created 4/12/2005 by x
'
'
   
    Dim objSentence As Range
    Dim strSentence As String
    Dim strPrompt As String
    Dim strReplacement As String
   
    For Each objSentence In ActiveDocument.Sentences
   
        strSentence = objSentence.Text
       
        objSentence.Find.ClearFormatting
        With objSentence.Find
            .Text = "<któr*>*<jak*>"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindStop
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchAllWordForms = False
            .MatchSoundsLike = False
            .MatchWildcards = True
        End With
        objSentence.Find.Execute
       
        If objSentence.Find.Found Then
           
            objSentence.Select
           
            strPrompt = Selection & vbNewLine & _
                        "was found in Sentence:" & vbNewLine & _
                        strSentence & vbNewLine & vbNewLine & _
                        "Please enter one of the following choices:" & vbNewLine & _
                        vbTab & "1: To add a comment" & vbNewLine & _
                        vbTab & "2: To edit the phrase"
                Select Case InputBox(strPrompt)
                Case 1
                    objSentence.Collapse
                    objSentence.Comments.Add objSentence, "This sentence needs revising"
                Case 2
                    objSentence.Text = InputBox("Please edit the text here", , objSentence.Text)
               
            End Select
           
         End If
       
    Next


The only problem is that it always starts from the beginning of the file, and since it's so large, it's hard to work with when I need to have it start from a place several hundreds of pages below.
0
 
edwardiiiCommented:
So far what we've got is the userform code, and two separate macros, on of which (not the last you posted but the one prior) changes the Lucynka bookmark.  Let's ignore that last macro you posted, as we know from past experience it can't do anything but start over from the beginning of the document each time.

Regarding the last macro I posted revisions to, that will loop for the count of sentences in your document:
     y = ActiveDocument.Sentences.Count
   
     For x = 1 To y


But let's make this clear--the code I've written deals with the Activedocument, and if you've got multiple documents open and are switching between them and jumping between running various macros and trying to use my userform solution, then I understand why this isn't working.

All I would like to know is, if you paste the code from the last macro I gave you edits for (and insert the edits) and you create a new word document and insert that macro (and make sure there are zero other macros in that document, e.g. there should only be 'macro1'), and then you drop in 10 pages of text from another Word document, and then close all other Word documents, and then run the macro--does it work or not?  If not, can you post this Word doc online somewhere so I can see what's going on?

     
0
 
LucynkaAuthor Commented:
>>>But let's make this clear--the code I've written deals with the Activedocument, and if you've got multiple documents open and are switching between them and jumping between running various macros and trying to use my userform solution, then I understand why this isn't working.

I'm not sure I understand.  I was describing to you the entire process of inserting comments from various sources into my document.  And yes, I always have several files open at the same time.  But when I run a macro or a user form, I'm not switching between documents.  I'm just getting through my main document, Find by Find and making the necessary changes.  And it did work originally.  Both the user form and the macros.

>>post this Word doc online somewhere so I can see what's going on
Where can I post the test file?

>>All I would like to know is, if you paste the code from the last macro I gave you edits for (and insert the edits) and you create a new word document and insert that macro (and make sure there are zero other macros in that document, e.g. there should only be 'macro1'), and then you drop in 10 pages of text from another Word document, and then close all other Word documents, and then run the macro--does it work or not?

No, it doesn't.  I pasted only 9 sentences and it found only one of them each time I ran the macro.  When I ran it again, it went to the next one and stopped.
0
 
edwardiiiCommented:
If you open a new word document, go to Tools/Macro/Macros, how many macros do you have listed (again, in a new Word document you've done nothing with but open).
0
 
LucynkaAuthor Commented:
I have selected "All active templates and documents" in my macros, so when I open a new document, I see them all, unless I click and change it to "Document 1", in which case there is only my "AutoExec" macro.
When I was doing a test for you with just one macro, I chose only that document and there was only that one test macro in the window.
0
 
edwardiiiCommented:
Ok.  Please post the contents of the AutoExec macro.  Also please post only a couple of paragraphs of the text you were working with.
0
 
LucynkaAuthor Commented:
I'll be happy to, but I really do not have much hopes for this direction.  I've had this AutoExec macro for a while now, it just opens all my files.  It's a recorded macro.  And my other macros work.  The only problems are with the Lucynka bookmark ones - the one macro and the user form.  I'm using the other macros without a problem (well, I could use some enhancements, but they do what they are now written to do).

Sub AutoExec()
'
' AutoExec Macro
' Macro recorded 10/27/2004 by x
'
    Documents.Open FileName:="""C:\Documents and Settings\Administrator\Desktop\Current Work\file1.doc""", ConfirmConversions:= _
        False, ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
        Application.WindowState = wdWindowStateMaximize
        ActiveWindow.ActivePane.View.Zoom.Percentage = 150
    Documents.Open FileName:= _
        """C:\Documents and Settings\Administrator\Desktop\Current Work\file2.doc""", ConfirmConversions _
        :=False, ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
        Application.WindowState = wdWindowStateMaximize
        ActiveWindow.ActivePane.View.Zoom.Percentage = 150
    Documents.Open FileName:="""C:\Documents and Settings\Administrator\Desktop\Current Work\file3.doc""", ConfirmConversions:=False, _
        ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
        Application.WindowState = wdWindowStateMaximize
        ActiveWindow.ActivePane.View.Zoom.Percentage = 150
    Documents.Open FileName:="""C:\Documents and Settings\Administrator\Desktop\Current Work\file4.doc""", ConfirmConversions:=False, _
        ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
        Application.WindowState = wdWindowStateMaximize
    Documents.Open FileName:="""C:\Documents and Settings\Administrator\Desktop\Current Work\file5.doc""", ConfirmConversions:=False, _
        ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
        Application.WindowState = wdWindowStateMaximize
    Documents.Open FileName:="""C:\Documents and Settings\Administrator\Desktop\Current Work\file6.doc""", ConfirmConversions:=False, _
        ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
        Application.WindowState = wdWindowStateMaximize
     
      End Sub

I'm testing with these sentences only:

1Typ b&#322;&#281;du, do którego stosuje si&#281;, jaki.

2Typ b&#322;&#281;du, do którego stosuje si&#281;, jakiego.

 3Typ b&#322;&#281;du, do którego stosuje si&#281;, jakie&#347; b&#322;&#281;dy.

 4Typ b&#322;&#281;du, do którego stosuje si&#281;, jaki.

5Typ b&#322;&#281;du, do którego stosuje si&#281;, jakiego.

6Typ b&#322;&#281;du, do którego stosuje si&#281;, jakie&#347; b&#322;&#281;dy.

7Typ b&#322;&#281;du, do którego stosuje si&#281;, jaki.

8Typ b&#322;&#281;du, do którego stosuje si&#281;, jakiego.

9Typ b&#322;&#281;du, do którego stosuje si&#281;, jakie&#347; b&#322;&#281;dy.

0
 
edwardiiiCommented:
Thank you.  I created 6 Word documents, then loaded your macro above (without the ", XMLTransform:=""   Application.WindowState = wdWindowStateMaximize
        ActiveWindow.ActivePane.View.Zoom.Percentage = 150" part, which kept giving me errors) into a separate Word doc as Macro1.  I then loaded the code I provided you as Macro2.  I copied the sample text above until I had 20 pages to work with, then ran Macro1 (so it opened 6 Word documents).  Then I ran Macro2, and it cycled through all 20 pages flawlessly, and started over at page 1 when it had reached the end of the Word doc.  So I'm confident the code I provided to you works, and the problem you're experiencing is related to the macros you've got in every Word document you work with.  Here are my final recommendations:

1)  Try a clean Word document (e.g. no macros) to run the code I gave you with.  All that's necessary is to delete any macros you see when you open a new instance
     of  Word, and add my code as macro1.  If it works, great, feel free to add all the macros you like, but sample the functionality after each addition--that way you'll know
     which one is problematic.  

2)  This is a long shot, but try placing "DoEvents" in the For loop of the code I gave you--if you've got another macro executing while you're running my code, that
     should give that other macro some leeway to do its thing.

3)   This really is a macro issue, and I'm not a macro expert:)  It would be worth your while to place a 20-point pointer to this question in the Word forum here at
      Experts Exchange.
0
 
LucynkaAuthor Commented:
>>>All that's necessary is to delete any macros you see when you open a new instance
     of  Word

In my Macro dialog box (Word 2003) I have a drop down menu in the middle of it which lets me choose, which macros I want to see.  It's called "Macros in:"  All my macros are in the Normal template and I then choose whether I want to see them or just see the ones in this one document.  I do not understand your cooment about deleting macros.  I cannot delete my macros from the Normal template and if I don't want any of my macros to be active in the document I'm working with, then I choose that document in this box.  Do you have a different version of Word?

>>>to place a 20-point pointer to this question in the Word forum here at
      Experts Exchange.
How do you do that and what will that do?

>>try placing "DoEvents" in the For loop of the code I gave you
I'm not a VB pro.  I do not know how to do that.  And I never run more than one macro at a time.


>>>I ran Macro2, and it cycled through all 20 pages flawlessly, and started over at page 1 when it had reached the end of the Word doc
I tried doing the same and it stopped at only one sentence each time. Again, I never deleted my macros from the Normal template.
0
 
Bob LambersonSoftware EngineerCommented:
Try this area..........
http://www.experts-exchange.com/help.jsp#hs6

or post question here..........
http://www.experts-exchange.com/Applications/MS_Office/Word/askQuestion.jsp

or ask JOrzech the Page Editor to help.
Bob
0
 
LucynkaAuthor Commented:
Thank you!
0
 
Bob LambersonSoftware EngineerCommented:
0
 
LucynkaAuthor Commented:
Thanks.

I've posted a question here:

http://www.experts-exchange.com/Applications/MS_Office/Word/askQuestion.jsp

It doesn't look like there is any difference between this and a "pointer question".  Let's see what happens.
0
 
GPrentice00Commented:
no resolution apparently, but some impressive back-and-forth to work through the problem, and make advances.  The processes involved appear to have value to someone with similar stumbling blocks, at least outline some procedures to try before hopefully asking their own detailed question for the carry-forward part.
0
 
moduloCommented:
PAQed with points refunded (500)

modulo
Community Support Moderator
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 21
  • 9
  • 4
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now