Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Writing a VS.NET Addin

Writing a VS.NET Addin

Scheduled Pinned Locked Moved Visual Basic
csharpvisual-studioquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cnurse
    wrote on last edited by
    #1

    I have written an add-in using VB.NET. Yipeee! OK, I've calmed down now! My add-in inserts some code which I wrap in a #region declaration and I want to automatically collapse the region to hide the generated code to keep the developers code in view as much as possible. Has anybody done this? I have tried using the Collapse and OutlineSection but I dont know if I am setting myself up in the text selection object correctly... ' Get a text object Dim lText As TextSelection = CType(applicationObject.ActiveDocument.Selection, TextSelection) ' Move to the beginning of the document so we can iterate over the whole thing. lText.StartOfDocument() If lText.FindPattern(mRegionHeader) Then lText.WordLeft() lText.OutlineSection() lText.Collapse() End If Any ideas would be warmly welcomed. Nursey

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups