LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Formatting in Word with ActiveX

I need to generate a formatted document in Word from within LabVIEW.
I've got most of it working, starting from an example NI had on their
web site. I am having trouble getting text formatted (bold, for
example) inside a table.
From what I can see, to format text, you need to specify the Range of
a Selection. Range is specified with Start and Stop, in units of
characters from the beginning of the document. When just doing plain
text, I can use the Count method for the Document to find out where I
am. But once I create a table, the table uses hidden characters to
define itself. Since Count returns all the characters in the document,
there is no way to calculate a Start and End for a position inside the
table.
It
seems like there should be some method for returning the current
insertion position in characters from the beginning of the file, but I
sure can't find it.
Can anyone give me a pointer on how to specify a Start and End for
text that you are entering inside a table (or just in general)?

Thanks,
Dave Thomson

-------------------------------------------------------------
David Thomson 303-499-1973 (voice and fax)
Original Code Consulting dthomson@originalcode.com
www.originalcode.com
National Instruments Alliance Program Member
-------------------------------------------------------------
Research Scientist 303-497-3470 (voice)
NOAA Aeronomy Laboratory 303-497-5373 (fax)
Boulder, Colorado dthomson@al.noaa.gov
-------------------------------------------------------------
0 Kudos
Message 1 of 2
(2,729 Views)
Try recording a macro which does what you want, then implement that macro in
LV.

"David Thomson" wrote in message
news:393E6198.3A2E3AA4@al.noaa.gov...
> I need to generate a formatted document in Word from within LabVIEW.
> I've got most of it working, starting from an example NI had on their
> web site. I am having trouble getting text formatted (bold, for
> example) inside a table.
> From what I can see, to format text, you need to specify the Range of
> a Selection. Range is specified with Start and Stop, in units of
> characters from the beginning of the document. When just doing plain
> text, I can use the Count method for the Document to find out where I
> am. But once I create a table, the table uses hidden characters to
> define itself. Since Count returns all the characters in the document,
> there is no way to calculate a Start and End for a position inside the
> table.
> It seems like there should be some method for returning the current
> insertion position in characters from the beginning of the file, but I
> sure can't find it.
> Can anyone give me a pointer on how to specify a Start and End for
> text that you are entering inside a table (or just in general)?
>
> Thanks,
> Dave Thomson
>
> -------------------------------------------------------------
> David Thomson 303-499-1973 (voice and fax)
> Original Code Consulting dthomson@originalcode.com
> www.originalcode.com
> National Instruments Alliance Program Member
> -------------------------------------------------------------
> Research Scientist 303-497-3470 (voice)
> NOAA Aeronomy Laboratory 303-497-5373 (fax)
> Boulder, Colorado dthomson@al.noaa.gov
> -------------------------------------------------------------




-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
0 Kudos
Message 2 of 2
(2,729 Views)