operator word's fields object with vc++

V

vispper

Please help me...

how can i get a field's code string with vc++ just
like 'myfield.code.text' in VB language, my code like the
follow, but it doesn't work

_Document mydoc;
mydoc.AttachDispatch(m_lpDisp);
CFields fields;
fields.AttachDispatch(mydoc.GetFields());

long count = fields.get_Count();
CField field;

for(long i=0;i<count;i++){
field.AttachDispatch(fields.Item(i+1));
AfxMessageBox(field.get_Data(),MB_OK,NULL);
}


thanks...
 

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