Sequentially numbering a word document on SharePoint

D

DJK

D

Doug Robbins - Word MVP

You will need to have a file somewhere that is accessible in which you can
store the last number used. One way that I can think of would to be to use
a Document Variable in that file that you accessed when creating a new form
to get the number that was stored there, add one to it to use in the new
form and write the new value back to the document variable and save the
document in which it is located.

--
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
 
D

DJK

How would you call the number from the document into the field? Is there a
way to use the system method from a SharePoint file?
 
D

Doug Robbins - Word MVP

Dim log As Document
Dim Lognumber As Long
Set log = Documents.Open("C:\log.doc")
With log
Lognumber = .Variables("Lognumber").Value + 1
.Variables("Lognumber").Value = Lognumber
.Save
.Close
End With
'Lognumber now contains the number for the next form



--
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