what is the last argument of function -addtextbox?

Ã

ÃÖÁ¤¿í

hi, dear..
i'm making ActiveX control that include MS Word Automation object.
with Visual C++.
and testing in ActiveX control test container..

i want to use shapes interface(in MS Word Object).
but, i don't now last argument -VARIANT* Anchor..
what is anchor..and how can i use that..
Are there examples??..

LPDISPATCH AddTextbox(long Orientation, float Left, float Top, float Width,
float Height, VARIANT* Anchor);

Always that function invoke Messagebox("type is not match")
thanks..
 
C

Cindy Meister -WordMVP-

Hi ÃÖÁ¤¿í,

Anchor is an OPTIONAL argument, which is why it's of type variant

Anchor refers to a Word RANGE. A range can be any consecutive string of one
or more characters in the binary file format. Usually, one would specify (in
VBA-speak) Selection.Range or a particular paragraph's range.

All graphical objects in a Word document's "drawing layer" (what enables text
wrap formatting) must be anchored to a paragraph. They will ALWAYS appear on
the same page as the anchoring paragraph (if it moves to a different page,
the graphic moves, too). A graphical object can be positioned relative to the
anchor ("move with text"), or relative to the page/margin/column.
i want to use shapes interface(in MS Word Object).
but, i don't now last argument -VARIANT* Anchor..
what is anchor..and how can i use that..
Are there examples??..

LPDISPATCH AddTextbox(long Orientation, float Left, float Top, float Width,
float Height, VARIANT* Anchor);

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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