[AccessD] Access 2 Word Bookmarks

Bob Heygood bheygood at abestsystems.com
Mon Jun 26 13:01:51 CDT 2006


If I protect the .dot form fields, my code will not update the text, nothing
happens.
My problem is not losing the text, I am deleting the bookmarks. So I can't
later import data from the .doc.

Sorry, the forest is really obscuring the trees now. I have tried to study
the object model and lots of info on the web, including yours.

Just to be clear:
I want to have a number of Word form fields on a .dot.
I want to save multiple copies with certain info inserted into some of the
fields.
I later want the end user to be able to insert/replace/delete data from any
of the fields.
I still later want to via Access VBA "harvest" all data from all fields.

Just writing this out really helps me. Hope it will allow you to help me
too.

TIA

Bob



-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Bryan
Carbonnell
Sent: Monday, June 26, 2006 9:03 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Access 2 Word Bookmarks


On 6/26/06, Bob Heygood <bheygood at abestsystems.com> wrote:
> Sorry, probably a critical part of this is I am using text form fields in
my
> .dot.

Yea, critical pice is right :)

> Are you familiar with these?

Yes. I'm quite familiar with them.

> The bookmark is "associated" with a particular text form field.
> When "type texting" after selecting a field in Word, it properly inserts
the
> text, but deletes the bookmark.
> Your method of just having a bookmark works perfectly and the bookmark is
> preserved.
> But.
> My client wants to have the option of someone maybe manually inserting
text
> later. And of course then me capturing it via Access VBA.

If the doc/dot a protected form in Word? Is that the end result? If
not, lose the text form fields and just use plain old bookmarks.

If you want to keep the form fields, you will first need to protect
the doc first before adding the data to the field. Siomething like:

doc.Protect wdProtectionFormField

(Double check with the intellisense, since I'm going from a failing memory)

You can then unprotect the doc to add other info at the bookmarks.

One of the parameters for Protect tells Word to keep and data in form
fields when you protect the doc. If you don't use it, any data in the
form field will be lost when the doc gets protected.

Clear as mud?

--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well
preserved body, but rather to skid in sideways, totally worn out,
shouting "What a great ride!"
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list