BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Please, how can I insert values into a field in a word docum

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
R.Archiere
Guest





PostPosted: Thu Jan 22, 2004 7:21 pm    Post subject: Please, how can I insert values into a field in a word docum Reply with quote



Hi, does anybody knows how to insert a value into a field in a current word
document ?

For example:

The word document has a field called 'NAME', and I need to fill this field
with a value.
After fill, the word runs a macro using this field.

Thanks

Rogério



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.566 / Virus Database: 357 - Release Date: 22/01/2004


Back to top
Mike Shkolnik
Guest





PostPosted: Thu Jan 22, 2004 9:03 pm    Post subject: Re: Please, how can I insert values into a field in a word d Reply with quote



R := Doc.Bookmarks.Item('NAME').Range;
R.Text := 'my new text';

--
With best regards, Mike Shkolnik
E-mail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
WEB: http://www.scalabium.com

"R.Archiere" <rogerio (AT) rasolutions (DOT) com.br> wrote

Quote:
Hi, does anybody knows how to insert a value into a field in a current
word
document ?

For example:

The word document has a field called 'NAME', and I need to fill this field
with a value.
After fill, the word runs a macro using this field.

Thanks

Rogério



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.566 / Virus Database: 357 - Release Date: 22/01/2004





Back to top
R.Archiere
Guest





PostPosted: Fri Jan 23, 2004 1:19 pm    Post subject: Re: Please, how can I insert values into a field in a word d Reply with quote



Mike, thanks for your help, but still wrong, because some part of the text
is protected, and I don't know all field names. How can I get all field
names?
May I send you my text? Maybe you looking at the text, you can solve this.

Please, help me.

Thanks a lot.

Rogério.

"Mike Shkolnik" <mshkolnik2002 (AT) ukr (DOT) net> escreveu na mensagem
news:40104043 (AT) newsgroups (DOT) borland.com...
Quote:
R := Doc.Bookmarks.Item('NAME').Range;
R.Text := 'my new text';

--
With best regards, Mike Shkolnik
E-mail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
WEB: http://www.scalabium.com

"R.Archiere" <rogerio (AT) rasolutions (DOT) com.br> wrote in message
news:401022a4 (AT) newsgroups (DOT) borland.com...
Hi, does anybody knows how to insert a value into a field in a current
word
document ?

For example:

The word document has a field called 'NAME', and I need to fill this
field
with a value.
After fill, the word runs a macro using this field.

Thanks

Rogério



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.566 / Virus Database: 357 - Release Date: 22/01/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.566 / Virus Database: 357 - Release Date: 22/01/2004



Back to top
Mike Shkolnik
Guest





PostPosted: Fri Jan 23, 2004 9:54 pm    Post subject: Re: Please, how can I insert values into a field in a word d Reply with quote

Quote:
Mike, thanks for your help, but still wrong, because some part of the text
is protected, and I don't know all field names.
Just iterate thru Bookmarks collection (Doc.Bookmarks)


--
With best regards, Mike Shkolnik
E-mail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
WEB: http://www.scalabium.com



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.