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 8608999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:45:57+00:00 2026-06-12T03:45:57+00:00

I am working on a Word 2007 Document-Level Add-In, using a .dotm file. It’s

  • 0

I am working on a Word 2007 Document-Level Add-In, using a .dotm file. It’s a document that is mostly controlled by buttons on the document pane, which are used to create and destroy certain parts of the document. Some of the things created are content controls.

One such button is a toggle, that needs to remove and re-add about 10 characters and a content control. My problem is that whenever I try to recreate the content control, Word throws a COMException with the message “Command Failed” and an error code of -2146824090 (or 0x800a1066).

Googling this error code suggests that this is a security-related exception related to using the Open or SaveAs methods to interact with Word documents, or with documents on network drives (See posts here, here, and here). This does not fit what I am doing at all.

Here is the code I am using to delete the control:

LevelControl.LockContentControl = false;
LevelControl.Delete(true);
LevelControl = null; // probably not needed

Here is the recreation code:

DropDownListContentControl LevelControl = this.Controls.AddDropDownListContentControl(r, "SectionLevel");

This is the same line of code I’m using to create the control initially.

  • 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-06-12T03:45:59+00:00Added an answer on June 12, 2026 at 3:45 am

    The cause of my issue was a misplaced range object. I had unwittingly placed the range inside another content control, which still contained placeholder text. Unfortunately, the error message said nothing to this effect.

    To determine whether you’re making the same mistake, try calling r.Select() at the end instead of whatever action may be causing this exception, and see where the cursor is placed. Be sure that the document is not limited to editing in fields when you do this (Review>Protect Document>Restrict Editing and Formatting), otherwise it may automatically move to the beginning of the document, or into a content control, before you can see it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on creating a macro in Microsoft Word (2007) for a document that
I'm working on a Word 2007 app-level add-in. So far, I haven't experienced major
I have developed a word 2007 add-in using Visual Studio 2010, everything is working
I have working code that opens up a word document programmatically using vbscript, makes
I'm working on a Microsoft word 2007 Document. my Objectives are to fill :
Using VBA in MS Project 2003 and working with a Word Document I try
I'm working on a Word 2007 template with a macro that will apply character
I am working with an application that creates a word document from a Word
We are already working in MS-WORD 2007 with C#4.0(WIN FORM Application) by using open
I am working with html document generated from Micrsoft Word 2007/2010. Besides generating incredibly

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.