TheĪbove script is a part of the entire script. Actually, i had developed a string of scripts in a single module which has several sub modules to clean the document. The below script works when i run the script separately, which means i have to separate the script and put it in a separate module. Thanks for helping make community forums a great place. We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time.
#Word count in microsoft word 2010 code
If it cannot help you, would you mind sharing your sample VBA code to help us troubleshoot since we can hardly pick out the issue from the error message.
WrdDoc.Endnotes(en.Index).Range.Text = RemoveDoubleSpaceInString(enstr)įunction RemoveDoubleSpaceInString(str As String) As String
WrdDoc.Footnotes(fn.Index).Range.Text = RemoveDoubleSpaceInString(fnstr) If you want the second situation, you could edit the code
It will achieve the first situation in the footnotes/endnotes section. Since you haven't provided your sample code, it's hard for us to troubleshoot. How do you want to remove double spaces? Do you mean to change the string " This is a sample string" to be "This is a sample string"? Or replace all double spaces >I am getting an AppCrash error while running the VBA script that removes double space in the footnotes/endnotes section in Microsoft Word 2010.<<