Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a bunch of sheets named Vendor (e.g. Vendor:1 or Vendor:2...). For certain things I want to exclude these sheets from count and print. I wanted to write an ilogic for this but my code is not working.
Dim oDoc As DrawingDocument oDoc = ThisApplication.ActiveDocument Dim oSheet As Sheet i = 0 x = 0 For Each oSheet In oDoc.Sheets i = i + 1 Next While (x<i) Sheet_Name = "Vendor:" & x x= x+1 'ThisDoc.Document.Sheets.Item(Sheet_Name).ExcludeFromPrinting = True <---Not working 'ThisDoc.Document.Sheets.Item(Sheet_Name).ExcludeFromCount = True <---Not working End While
Solved! Go to Solution.