Add TextBox in Word?

Add-in Express™ Support Service
That's what is more important than anything else

Add TextBox in Word?
 
Srdjan Klasnja




Posts: 12
Joined: 2014-01-10
Hello,

I need in my project to show context popup inside Word document on mouse click. The form of this popup should be like tooltip with some short informations to be displayed.

So far I managed to show that information in Side Pane, but it would be great to have it in form of textbox control (Microsoft.Office.Tools.Word.Controls.TextBox) positioned in range of click.

As I read from http://www.add-in-express.com/forum/read.php?FID=5&TID=11204 it is not implemented yet in Add-in Express.

Is there any news regarding this issue, or advice how to implement similiar feature?

Thanks,
Srdjan
Posted 13 Feb, 2014 04:28:21 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Srdjan,

Microsoft.Office.Tools.Word.Controls.TextBox is about VSTO. Add-in Express cannot support this namespace. Still, you can use context controls as they are available in the Word Object model: myDocument.ContentControls.Add(Word.wdContentControlText).

Hope this helps.


Andrei Smolin
Add-in Express Team Leader
Posted 13 Feb, 2014 05:47:39 Top
Srdjan Klasnja




Posts: 12
Joined: 2014-01-10
Thanks Andrei,

I try to use ContentControls but I can not find it. Do I have wrong version of assembly reference?

I'm using Interop.Word.dll, v8.1.0.0

After installing Microsoft Office 2010: Primary Interop Assemblies Redistributable, based on this post http://www.add-in-express.com/forum/read.php?FID=5&TID=3063 , I still have reference in old (and new) Add-in project to Interop.Word.dll, v8.1.0.0

What is the right procedure to implement ContentControls in VS2012 add-in expres project for Word 2010?

Thanks again,
Srdjan
Posted 14 Feb, 2014 06:17:42 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Srdjan,

You need to copy the corresponding interops from {Add-in Express}\Redistributables to the Interops folder of your project and add the corresponding references. You can delete existing interops and references.

You need to use interops for Office 2007 or above, since contrent controls were introduced in Word 2007.


Andrei Smolin
Add-in Express Team Leader
Posted 14 Feb, 2014 06:28:45 Top