Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6347433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:12:47+00:00 2026-05-24T21:12:47+00:00

I am using COM interop for Word automation within my Silverlight-Ouf-Of-Browser application. This means

  • 0

I am using COM interop for Word automation within my Silverlight-Ouf-Of-Browser application. This means that I can’t reference COM directly but instead I rely on dynamic.

Now I would like to call the following method:

Range.Collapse(WdCollapseDirection direction).

How do I find out what values are mapped to the individual enum values (e.g.does wdCollapseEnd have a value of 1 or 2)?

Kind regards!

PS: For further info on the method signature see http://msdn.microsoft.com/de-de/library/microsoft.office.interop.word.range.collapse

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:12:51+00:00Added an answer on May 24, 2026 at 9:12 pm

    Tools like Reflector make that fairly simple. You could even use ILDASM that comes with part of the .NET Framework.

    You can load the Primary Interop Assembly with either of those two tools. Reflector shows the C# source as:

    public enum WdCollapseDirection
    {
        wdCollapseEnd,
        wdCollapseStart
    }
    

    Since they have no explicit values, wdCollapseEnd is 0 and wdCollapseStart is 1. We can confirm with the IL view:

    .class public auto ansi sealed WdCollapseDirection
        extends [mscorlib]System.Enum
    {
        .field public specialname rtspecialname int32 value__
    
        .field public static literal valuetype Microsoft.Office.Interop.Word.WdCollapseDirection wdCollapseEnd = int32(0)
    
        .field public static literal valuetype Microsoft.Office.Interop.Word.WdCollapseDirection wdCollapseStart = int32(1)
    
    }
    

    ILDASM shows this:

    .field public static literal valuetype Microsoft.Office.Interop.Word.WdCollapseDirection wdCollapseEnd = int32(0x00000000)
    

    If you have a tool like Resharper, doing Ctrl+Q on it directly from within Visual Studio shows this:

    enter image description here

    You could have a dummy project that you can use to look up the values.

    As an additional option, if you use LINQPad you could reference the Word Primary Interop Assembly (Microsoft.Office.Interop.Word – should be in the GAC) and run this:

    void Main()
    {
        var value = (int) Microsoft.Office.Interop.Word.WdCollapseDirection.wdCollapseStart;
        Console.Out.WriteLine("value = {0}", value);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the core problem: I have a .NET application that is using COM interop
Am using COM interop in my C# application. I've this line of code: IMyInterface
I've written a .NET DLL which is called from another application using COM interop.
We're implementing a new solution in our classic ASP environment that's using COM interop
I've added types to my .NET classes that I'm using for COM interop. To
I'm trying to do this in my C++ program and I'm using COM Interop.
I am writing an application that extracts images from an Excel spreadsheet using COM
I'm developing word automation application and I'm facing serious issue with unexpected RPC/COM cast
I created a COM-interop .dll with this simple class: using System.Runtime.InteropServices; namespace ClassLibrary1 {
I am calling a .Net assembly from a Delphi project using COM interop. Can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.