Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Tue, 4 Sep 2007 05:46:03 -0700,    group: microsoft.public.word.vba.addins        back       


Replacing the word content   
I have created a 2007 addin using VSTO for office 2007 second edition, which 
will add a custom pane and will retrieve the data from the sql server. 

Now i have to add this data to the word document in a particular location. I 
have tried using Bookmarks. But the value is appending in the bookmark. I 
want to raplace the  content in bookmark. How to do it???

Thanks in advance.
date: Tue, 4 Sep 2007 05:46:03 -0700   author:   Rams

Re: Replacing the word content   
Hi Rams

At the simplest level, you need something like this:

    ActiveDocument.Bookmarks("MyBookmark").Range.Text = "My new text"

However, that will destroy the bookmark. If you need to retain the bookmark, 
see
Inserting text at a bookmark without deleting the bookmark
http://www.word.mvps.org/FAQs/MacrosVBA/InsertingTextAtBookmark.htm

Hope this helps.

Shauna Kelly.  Microsoft MVP.
http://www.shaunakelly.com/word


"Rams"  wrote in message 
news:E53E686F-21D3-4AFB-80D7-67486D9F5095@microsoft.com...
>
> I have created a 2007 addin using VSTO for office 2007 second edition, 
> which
> will add a custom pane and will retrieve the data from the sql server.
>
> Now i have to add this data to the word document in a particular location. 
> I
> have tried using Bookmarks. But the value is appending in the bookmark. I
> want to raplace the  content in bookmark. How to do it???
>
> Thanks in advance.
date: Wed, 5 Sep 2007 18:12:32 +1000   author:   Shauna Kelly

Re: Replacing the word content   
Thanks. It works fine.

I have a table of 10 rows. In each row i have the bookmark. Is there any 
other way for filling up the tables ???


"Shauna Kelly" wrote:

> Hi Rams
> 
> At the simplest level, you need something like this:
> 
>     ActiveDocument.Bookmarks("MyBookmark").Range.Text = "My new text"
> 
> However, that will destroy the bookmark. If you need to retain the bookmark, 
> see
> Inserting text at a bookmark without deleting the bookmark
> http://www.word.mvps.org/FAQs/MacrosVBA/InsertingTextAtBookmark.htm
> 
> Hope this helps.
> 
> Shauna Kelly.  Microsoft MVP.
> http://www.shaunakelly.com/word
> 
> 
> "Rams"  wrote in message 
> news:E53E686F-21D3-4AFB-80D7-67486D9F5095@microsoft.com...
> >
> > I have created a 2007 addin using VSTO for office 2007 second edition, 
> > which
> > will add a custom pane and will retrieve the data from the sql server.
> >
> > Now i have to add this data to the word document in a particular location. 
> > I
> > have tried using Bookmarks. But the value is appending in the bookmark. I
> > want to raplace the  content in bookmark. How to do it???
> >
> > Thanks in advance. 
> 
> 
>
date: Wed, 5 Sep 2007 03:20:01 -0700   author:   Rams

Re: Replacing the word content   
Hi

Yes, there are lots of ways for filling in tables. Can you give us some more 
information about the nature of the data and what you're trying to achieve?

Hope this helps.

Shauna Kelly.  Microsoft MVP.
http://www.shaunakelly.com/word


"Rams"  wrote in message 
news:2F149DF4-54B1-4B0E-A51C-0F37588E47EF@microsoft.com...
>
> Thanks. It works fine.
>
> I have a table of 10 rows. In each row i have the bookmark. Is there any
> other way for filling up the tables ???
>
>
> "Shauna Kelly" wrote:
>
>> Hi Rams
>>
>> At the simplest level, you need something like this:
>>
>>     ActiveDocument.Bookmarks("MyBookmark").Range.Text = "My new text"
>>
>> However, that will destroy the bookmark. If you need to retain the 
>> bookmark,
>> see
>> Inserting text at a bookmark without deleting the bookmark
>> http://www.word.mvps.org/FAQs/MacrosVBA/InsertingTextAtBookmark.htm
>>
>> Hope this helps.
>>
>> Shauna Kelly.  Microsoft MVP.
>> http://www.shaunakelly.com/word
>>
>>
>> "Rams"  wrote in message
>> news:E53E686F-21D3-4AFB-80D7-67486D9F5095@microsoft.com...
>> >
>> > I have created a 2007 addin using VSTO for office 2007 second edition,
>> > which
>> > will add a custom pane and will retrieve the data from the sql server.
>> >
>> > Now i have to add this data to the word document in a particular 
>> > location.
>> > I
>> > have tried using Bookmarks. But the value is appending in the bookmark. 
>> > I
>> > want to raplace the  content in bookmark. How to do it???
>> >
>> > Thanks in advance.
>>
>>
>>
date: Sat, 8 Sep 2007 00:12:22 +1000   author:   Shauna Kelly

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us