473,387 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Word.BuiltInDocumentProperties("NUMBER OF LINES")

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
5 4629
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Alex Martelli | last post by:
I hesitate a bit to post this, but... on the Italian Python NG, somebody was asking whether there was any way to convert an integer number x into a string which represents it in an arbitrary base N...
8
by: bonj | last post by:
hello I hope somebody can help me get my head around this area of 'stream' programming... I know that streams are very fashionable nowadays so hopefully there'll be lots of replies. ;-) ...
1
by: lawrence | last post by:
I'm trying to gain a better understanding of javascript by studying examples. I noticed this in an online tutorial. I don't get the use of "this". >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> You might want...
9
by: rnn98 | last post by:
hi, my multithread application, running under solaris box, is crashing eventually. I tried to spot and substitute functions not "thread safe", but I guess my search wasn't good enough. I have put...
289
by: napi | last post by:
I think you would agree with me that a C compiler that directly produces Java Byte Code to be run on any JVM is something that is missing to software programmers so far. With such a tool one could...
8
by: vijay | last post by:
Hello, As the subject suggests, I need to print the string in the reverse order. I made the following program: # include<stdio.h> struct llnode { char *info;
13
by: kurtj | last post by:
Hello Gurus: I have a validation script (below) that is somehow messed up. If the Name field is blank, I get the alert message, then the browser window goes to a blank document with the word...
1
hpbutterbeer
by: hpbutterbeer | last post by:
We have a Machine Project and my brain is currently in a clouded state. Sorry, I'm just a beginner in C Programming... Text twist is a windows game whose main objective is to form words out of the...
11
by: arnuld | last post by:
C takes input character by character. I did not find any Standard Library function that can take a word as input. So I want to write one of my own to be used with "Self Referential Structures" of...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.