ActiveX object in Word?


D

David Thielen

Hi;

What we want to do is to have our own objects in Word where we determine the
size of them (they will always be rectangular) and draw them. We will use our
AddIn to insert/edit/delete these objects at the caret location.

These objects need to stay in the flow of the document. So if we have "hi
<<object>> there" and we insert 3 pages of text above that line, all of "hi
<<object>> there" gets moved down 3 pages.

The object needs to have data stored at each location because that data
tells us what that particular object is.

A good way to think of it is each object holds a number of 0...5 and that
number maps to an icon. When the user in the AddIn sets the number, we then
render that icon. (What we are doing is a bit more complicated.)

So question 1 is - what is the best way to do this? I assume ActiveX but if
there is a better way, I am happy to hear it.

For whatever approach these are the questions I have come up with so far:

2) How do I have my AddIn (which is in C#) create/edit/delete the objects?

3) How do I tell Word where the ActiveX dll is and how does it know to use it?

4) If someone does not have the ActiveX.dll on their system, how do I have
something reasonable rendered for the object?

5) Our back-end engine that parses the Word document is a java program. How
do I read the embedded ActiveX object data to get the data that identifies
what the object is?

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

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

Advertisements

W

Wei Lu [MSFT]

Hello Dave,

From your description, my understanding of this issue is that you want to
insert a ActiveX control into the Word and use the Addin to control the
ActiveX control.

Based on my research, I found that if you want to insert the ActiveX
Control, it will be a lot of works to do. You may need to register the dll
and not all the ActiveX control could be inserted.

So I would like to know whether you could use some alternate approach.

Such as using a Icon to show up at the correct location and use some other
approach to stored the data.


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;

An icon won't work because we need to:
1) Show a tooltip when the mouse is over the icon.
2) Bring up our AddIn when the user double clicks on the icon.
3) Store a select and other data that is unique to each icon.

Can you tell me how to do this as an ActiveX 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 am consulting the internal team to get some more detailed steps.

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.
 
W

Wei Lu [MSFT]

Hello Dave,

Word isn't really designed to be an ActiveX container like a UserForm is so
it may not support any ActiveX control that a form would but you would just
register the control just like any other ActiveX component. The COM AddIn
would use references to the Word application to manipulate documents. Also
note that inserting an ActiveX control into a Document resets the project
for that document so it should not be inserted into documents running code.


You would use code similar to this
Selection.InlineShapes.AddOLEControl ClassType:="Forms.TextBox.1"

Then it will be part of the OLEFormat of the shape which has an Object
property which contains the object.


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.
 
W

Wei Lu [MSFT]

Hello Dave,

Actually, this appears to be mostly a consulting type question. As such
the support we can offer in these newsgroups for this issue are somewhat
limited. I have provided what information I can about this question, and I
hope it will help successfully address your concerns. If you would like
more assistance with this issue, please refer to the links I've included at
the end of this post. Thanks for understanding!

If you need further assistance on this issue, you can directly contact our
CSS for Advisory Services following the link below:
http://support.microsoft.com/default.aspx?pr=AdvisoryService

Thank you!

Sincerely,

Wei Lu

Microsoft Online Community Support

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

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

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

Advertisements

W

Wei Lu [MSFT]

Hello Dave,

I am willing to help you. If I have any discovery, I will post.

Sincerely,

Wei Lu

Microsoft Online Community Support

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

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================
(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