By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,295 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,295 IT Pros & Developers. It's quick & easy.

Word.BuiltInDocumentProperties("NUMBER OF LINES")

P: n/a
Hey everybody,
I've got a VB.NET program that is trying to access a Word document and I'm
having all kinds of trouble. First on is the above. I'm trying to get the
number of lines in the document and when I try
docWord.BuiltInDocumentProperties("NUMBER OF LINES") it returns an Object.
When I look in the debugger, it is of type {System.__ComObject} and appears
to have no values. When I get the type - it says the same thing. How can I
get at the actual value?

Are there any good websites about using the office objects in .NET?
Everything I've seen so far seems to be oriented to VBA which is not what
I'm using.

TIA - Jeffrey.
Nov 20 '05 #1
Share this Question
Share on Google+
5 Replies

P: n/a
Jeffrey,

The way I figured it out was to set up a project with debug and take a look
at the word documents object. Drilling down through the different levels
will be an enlightening experience. Word documents have very complex data
structures.
You might also try writing one out as an XML document and studying it as an
XML text document. Have fun.

Regards

"Jeffrey Bradshaw" <Je**************@Dictaphone.comNOSPAM> wrote in message
news:u8**************@TK2MSFTNGP11.phx.gbl...
Hey everybody,
I've got a VB.NET program that is trying to access a Word document and I'm
having all kinds of trouble. First on is the above. I'm trying to get the
number of lines in the document and when I try
docWord.BuiltInDocumentProperties("NUMBER OF LINES") it returns an Object.
When I look in the debugger, it is of type {System.__ComObject} and appears to have no values. When I get the type - it says the same thing. How can I
get at the actual value?

Are there any good websites about using the office objects in .NET?
Everything I've seen so far seems to be oriented to VBA which is not what
I'm using.

TIA - Jeffrey.

Nov 20 '05 #2

P: n/a
Jerry,
Thanks I guess but that doesn't help. I've already been through the debugger
and looked at the assorted properties. BuildInDocumentProperties is of type
System.__ComObject and doesn't appear to have anything in it.

Any help anybody can give would be greatly appreciated.

JB.
"Jerry" <Je*********@Yahoo.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Jeffrey,

The way I figured it out was to set up a project with debug and take a look at the word documents object. Drilling down through the different levels
will be an enlightening experience. Word documents have very complex data
structures.
You might also try writing one out as an XML document and studying it as an XML text document. Have fun.

Regards

"Jeffrey Bradshaw" <Je**************@Dictaphone.comNOSPAM> wrote in message news:u8**************@TK2MSFTNGP11.phx.gbl...
Hey everybody,
I've got a VB.NET program that is trying to access a Word document and I'm having all kinds of trouble. First on is the above. I'm trying to get the number of lines in the document and when I try
docWord.BuiltInDocumentProperties("NUMBER OF LINES") it returns an Object. When I look in the debugger, it is of type {System.__ComObject} and

appears
to have no values. When I get the type - it says the same thing. How can I get at the actual value?

Are there any good websites about using the office objects in .NET?
Everything I've seen so far seems to be oriented to VBA which is not what I'm using.

TIA - Jeffrey.


Nov 20 '05 #3

P: n/a
Jeffrey,

And you have tried iterating over the collection of sections?

"Jeffrey Bradshaw" <Je**************@Dictaphone.comNOSPAM> wrote in message
news:eC**************@TK2MSFTNGP11.phx.gbl...
Jerry,
Thanks I guess but that doesn't help. I've already been through the debugger and looked at the assorted properties. BuildInDocumentProperties is of type System.__ComObject and doesn't appear to have anything in it.

Any help anybody can give would be greatly appreciated.

JB.
"Jerry" <Je*********@Yahoo.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Jeffrey,

The way I figured it out was to set up a project with debug and take a look
at the word documents object. Drilling down through the different levels
will be an enlightening experience. Word documents have very complex data
structures.
You might also try writing one out as an XML document and studying it as

an
XML text document. Have fun.

Regards

"Jeffrey Bradshaw" <Je**************@Dictaphone.comNOSPAM> wrote in

message
news:u8**************@TK2MSFTNGP11.phx.gbl...
Hey everybody,
I've got a VB.NET program that is trying to access a Word document and

I'm having all kinds of trouble. First on is the above. I'm trying to get the number of lines in the document and when I try
docWord.BuiltInDocumentProperties("NUMBER OF LINES") it returns an Object. When I look in the debugger, it is of type {System.__ComObject} and

appears
to have no values. When I get the type - it says the same thing. How
can I get at the actual value?

Are there any good websites about using the office objects in .NET?
Everything I've seen so far seems to be oriented to VBA which is not what I'm using.

TIA - Jeffrey.



Nov 20 '05 #4

P: n/a
Jerry,
If you go into the sections object of a Word document, there is no BuildIn
properties type thing (or at least it's not listed in the code window when
you start typing in the sections.)

Any other ideas?

JB.

"Jerry" <Je*********@Yahoo.com> wrote in message
news:Oq*************@TK2MSFTNGP11.phx.gbl...
Jeffrey,

And you have tried iterating over the collection of sections?

"Jeffrey Bradshaw" <Je**************@Dictaphone.comNOSPAM> wrote in message news:eC**************@TK2MSFTNGP11.phx.gbl...
Jerry,
Thanks I guess but that doesn't help. I've already been through the

debugger
and looked at the assorted properties. BuildInDocumentProperties is of

type
System.__ComObject and doesn't appear to have anything in it.

Any help anybody can give would be greatly appreciated.

JB.
"Jerry" <Je*********@Yahoo.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Jeffrey,

The way I figured it out was to set up a project with debug and take a

look
at the word documents object. Drilling down through the different levels will be an enlightening experience. Word documents have very complex data structures.
You might also try writing one out as an XML document and studying it
as an
XML text document. Have fun.

Regards

"Jeffrey Bradshaw" <Je**************@Dictaphone.comNOSPAM> wrote in

message
news:u8**************@TK2MSFTNGP11.phx.gbl...
> Hey everybody,
> I've got a VB.NET program that is trying to access a Word document
and I'm
> having all kinds of trouble. First on is the above. I'm trying to
get the
> number of lines in the document and when I try
> docWord.BuiltInDocumentProperties("NUMBER OF LINES") it returns an

Object.
> When I look in the debugger, it is of type {System.__ComObject} and
appears
> to have no values. When I get the type - it says the same thing. How

can
I
> get at the actual value?
>
> Are there any good websites about using the office objects in .NET?
> Everything I've seen so far seems to be oriented to VBA which is not

what
> I'm using.
>
> TIA - Jeffrey.
>
>



Nov 20 '05 #5

P: n/a
On Sat, 29 Nov 2003 18:08:46 -0500, "Jeffrey Bradshaw" <Je**************@Dictaphone.comNOSPAM>
wrote:

Hey everybody,
I've got a VB.NET program that is trying to access a Word document and I'm
having all kinds of trouble. First on is the above. I'm trying to get the
number of lines in the document and when I try
docWord.BuiltInDocumentProperties("NUMBER OF LINES") it returns an Object.
When I look in the debugger, it is of type {System.__ComObject} and appears
to have no values. When I get the type - it says the same thing. How can I
get at the actual value?


You probably need to specify the Value property:

docWord.BuiltInDocumentProperties("NUMBER OF LINES").Value
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.