Field Question

J

Jake

Hi,

I am trying to create a word document based on a data source. The document
has some static elements which we be filled in by the data source. My
question is:

Should I use bookmarks rather than fields to accomplish this?
I was wondering how I could accomplish this using fields?

The only problem I have with Bookmarks is that you cannot see them in the
template form.

Thanks
 
D

Doug Robbins

Under Tools>Options>View, you can turn on the display of Bookmarks.

However, as that may not suit, you can used Document Variables and
DOCVARIABLE fields to display the information in the document.

The code to use would be

ActiveDocument.Variables("myvariable").Value = [data value from your data
source]
'repeat with a new variable for each data item
'then to update the fields in the document
ActiveDocument.Fields.Update


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
J

Jake

Thanks for the reply. Are there any reason to use one over the other?

Thanks

Doug Robbins said:
Under Tools>Options>View, you can turn on the display of Bookmarks.

However, as that may not suit, you can used Document Variables and
DOCVARIABLE fields to display the information in the document.

The code to use would be

ActiveDocument.Variables("myvariable").Value = [data value from your data
source]
'repeat with a new variable for each data item
'then to update the fields in the document
ActiveDocument.Fields.Update


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
Jake said:
Hi,

I am trying to create a word document based on a data source. The document
has some static elements which we be filled in by the data source. My
question is:

Should I use bookmarks rather than fields to accomplish this?
I was wondering how I could accomplish this using fields?

The only problem I have with Bookmarks is that you cannot see them in the
template form.

Thanks
 
D

Doug Robbins

Bookmarks are a bit fragile and very easy to delete following which the data
is lost. The Docvariable field can be reinstered and will display the data
when it is updated.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
Jake said:
Thanks for the reply. Are there any reason to use one over the other?

Thanks

Doug Robbins said:
Under Tools>Options>View, you can turn on the display of Bookmarks.

However, as that may not suit, you can used Document Variables and
DOCVARIABLE fields to display the information in the document.

The code to use would be

ActiveDocument.Variables("myvariable").Value = [data value from your data
source]
'repeat with a new variable for each data item
'then to update the fields in the document
ActiveDocument.Fields.Update


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
Jake said:
Hi,

I am trying to create a word document based on a data source. The document
has some static elements which we be filled in by the data source. My
question is:

Should I use bookmarks rather than fields to accomplish this?
I was wondering how I could accomplish this using fields?

The only problem I have with Bookmarks is that you cannot see them in the
template form.

Thanks
 
B

Bjorn Buijing

Been looking for this too.
Thanks ;-)

Doug Robbins said:
Under Tools>Options>View, you can turn on the display of Bookmarks.

However, as that may not suit, you can used Document Variables and
DOCVARIABLE fields to display the information in the document.

The code to use would be

ActiveDocument.Variables("myvariable").Value = [data value from your data
source]
'repeat with a new variable for each data item
'then to update the fields in the document
ActiveDocument.Fields.Update


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
Jake said:
Hi,

I am trying to create a word document based on a data source. The document
has some static elements which we be filled in by the data source. My
question is:

Should I use bookmarks rather than fields to accomplish this?
I was wondering how I could accomplish this using fields?

The only problem I have with Bookmarks is that you cannot see them in the
template form.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top