Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-08-2012, 09:45 PM
macropod's Avatar
macropod macropod is offline Loop through listboxes in Application.OrganizerCopy Windows 7 64bit Loop through listboxes in Application.OrganizerCopy Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


Hi Marrick,

OK, but that's not the "subscript out of range" error you originally mentioned. From my testing error 4198 appears to occur when you try to use OrganizerCopy to copy one of Word's builtin Styles. If you're happy not to work with them, you could modify the PopulateSourceList sub by adding an If test to your 'For Each aStyle In ActiveDocument.Styles' loop, thus:
Code:
For Each aStyle In ActiveDocument.Styles
  If aStyle.BuiltIn = False Then
    ListBox1.AddItem (aStyle)
    CountSourceStyles = CountSourceStyles + 1
    lblSourceCount.Caption = "(" & CountSourceStyles & ")"
  End If
Next aStyle
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use for loop in formula in VBA? tinfanide Excel Programming 1 12-06-2011 08:33 AM
music loop in powerpoint presentation genoMU69 PowerPoint 1 06-15-2011 08:00 AM
While loop not working right Cbrehm Excel Programming 0 05-11-2011 11:05 AM
Loop through listboxes in Application.OrganizerCopy Continuous Loop cksm4 Word 6 01-06-2011 09:03 PM
Outlook 2003 restart in a loop Stegel Outlook 0 06-29-2007 12:34 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:58 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft