|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
{System.__ComObject}In Word VBA the expression "ActiveDocument.Paragraphs(1).Style returns
"Heading 3" In VB.Net the expression "appWord.ActiveDocument.Paragraphs(1).Style" returns "{System.__ComObject} [System.__ComObject]: {System.__ComObject}" How can I get vb.net to return "Heading 3" instead of "{System.__ComObject} [System.__ComObject]: {System.__ComObject}". Thanks in advance for any help. Ron Dahl Hi Ron,
When .NET objects need to interact with COM objects, they use "wrappers" and sometimes when querying the type you get "System.__ComObject". To know the actual type behing a __ComObject, use: Microsoft.VisualBasic.Information.Typename(variable) -- Show quoteHide quoteBest regards, Carlos J. Quintero MZ-Tools: Productivity add-ins for Visual Studio You can code, design and document much faster: http://www.mztools.com "Ron Dahl" <rd***@ghp.com> escribió en el mensaje news:ua%23PqAMQGHA.1040@TK2MSFTNGP12.phx.gbl... > In Word VBA the expression "ActiveDocument.Paragraphs(1).Style returns > "Heading 3" > > In VB.Net the expression "appWord.ActiveDocument.Paragraphs(1).Style" > returns "{System.__ComObject} [System.__ComObject]: {System.__ComObject}" > > How can I get vb.net to return "Heading 3" instead of > "{System.__ComObject} [System.__ComObject]: {System.__ComObject}". > > Thanks in advance for any help. > > Ron Dahl > "Ron Dahl" <rd***@ghp.com> schrieb: Use 'ActiveDocument.Paragraphs(1).Style.NameLocal' instead.> In Word VBA the expression "ActiveDocument.Paragraphs(1).Style returns > "Heading 3" > > In VB.Net the expression "appWord.ActiveDocument.Paragraphs(1).Style" > returns "{System.__ComObject} [System.__ComObject]: {System.__ComObject}" > > How can I get vb.net to return "Heading 3" instead of > "{System.__ComObject} [System.__ComObject]: {System.__ComObject}". -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
Treeview population directly from MSAccess
Is there an expected return difference between the following two codes Datagrid with comboboxes storing mysql data to a random access file debug problem Excel.application Error Message How to have the same info on two menus Form resizing on different machines VB.NET 2003 Question: Datalogger->Tables |
|||||||||||||||||||||||