Bug Report - Document.Variables requires get_Item()

D

David Thielen

Hi;

I am trying somehow to get these bugs reported to the Word group (having no
luck so far):

To delete a Word.Document.Variable in Word.Document.Variables you have to
call

object obj = var.Name;
document.Variables.get_Item(ref obj).Delete();.

I am assuming this is because of the ref object passed to it. But it is
strange that you can’t call

document.Variables[var.Name].Delete();.

And the intellisense in VisualStudio allows the [string] but does not know
of the get_Item. (I’m not sure this is a bug because of how PIAs are built
but it does strike me that it could be.)

- dave
 
P

Peter Huang

Hi

I will research the issue and update you with new information ASAP.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Peter Huang

Hi

I can reproduce the problem on my side, I think this is caused by that the
interop assembly did not support the indexer syntax to access the variables
collection.
I have reported the problem to dev team. Hope this helps.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
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