ActiveX control in Word

D

David Thielen

Hi;

I am trying to create an ActiveX control (in C++/MFC based on suggestions)
that will go in a Word document. Our Word AddIn (written in C#) will
insert/edit/delete the control - the ActiveX control should have no UI. It is
merely a way to display itself in Word.

1a) From inside my ActiveX code, when they double clicked on the object, I
need to bring up a form in our C# AddIn set to edit the properties in the
control. How can I launch my C# AddIn from inside the C++ ActiveX control?

1b) And when the Form comes up, how can I tell it which object I am on so it
can populate itself from the properties in the control?

2) Our back end engine is a Java program and needs to be able to extract the
properties in the control. How do we parse the byte stream of a control to do
so in rtf, Word 2003 WordML, and docx? I can uudecode the bytes but then
what? It's some binary structure.

3) How do I (from my C# AddIn) call Word to have it give me all of my
objects within a range?

4) How do I (from my C# AddIn):
a) create a control, setting it's properties.
b) edit a control, reading it's properties, changing them, and writing
the new properties back out.
c) delete a control.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
W

Wei Lu [MSFT]

Hello Dave,

I have consulted some internal team member and would like to provide some
clue for you.

1. You need to get the currenct Word application in your ActiveX Control so
that you could get the running Com add-in instance to call the COM add-in.

2. For the Jave parse issue, I suggest you convert the word document to the
OpenXML if you are using the 2007.

http://msdn2.microsoft.com/en-us/library/bb266220.aspx

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

David Thielen

Hi;

A couple of follow-on questions please:

1) How do I: a) get the current Word application, b) get the running COM
add-in instance, and c) tell that COM add-in instance to then bring up my
edit form and pass it the correct object data?

2) I have looked at it in OpenXML but it is a uuencoded binary stream. How
do I read that binary stream?

3 & 4) Any suggestions on these?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
W

Wei Lu [MSFT]

Hello Dave,

You may need to read the process to know the current word application.
Then you could use the Application.Addins.addin to get the addin.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top