unique ID over multiple instances of document

  • Thread starter OTWarrior via OfficeKB.com
  • Start date
O

OTWarrior via OfficeKB.com

I have a document that a large ammount of different teams are going to use,
and the data on this document will be pulled into the access database. Since
multiple versions of the same form could come in, I need to have a Unique
Identifier so I can read the correct form when it comes in.

I have tried using autotext (using date and/or time) however that is the
current time, so when you next view the form, the information is updated.

Would I have to do this via a macro on form close/load, as I did have to take
out all of my macros before to keep the filesize down.

Thanks in advance
 
O

OTWarrior via OfficeKB.com

So far I have come up with this:

Selection.GoTo What:=wdGoToBookmark, Name:="Text1"
With ActiveDocument.Bookmarks
.DefaultSorting = wdSortByName
.ShowHidden = False
End With
Selection.TypeText Text:=Now()
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text2"
.DefaultSorting = wdSortByName
.ShowHidden = False
End With

But the document is a protected document, so only the text form fields can be
entered into. the code i have only works in unprotected mode, and actually
removes the text form field (which is kind of intentional as i only want this
information done once when created)
 
D

Doug Robbins - Word MVP

See the article "Creating sequentially numbered documents (such as
invoices)" at:

http://www.word.mvps.org/FAQs/MacrosVBA/NumberDocs.htm

The procedure will probably need some modification for your application.


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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