G
G
Grigory Bondarenko2019-08-15 16:16:24
Text editors
Grigory Bondarenko, 2019-08-15 16:16:24

Co-authoring text from Active Directory domain workstations without the cloud?

I'm looking for an elegant solution that would allow in a domain network to realize the possibility of joint editing of text documents (even without formatting). The fact is that I don’t want to create accounts in the cloud, I don’t want to raise Share Point and I don’t want to make life difficult for employees by explaining how to run the server part in the NotePad ++ plugin. Employees have domain accounts under which they are logged into their workstations, each department has its own network folder, to which only employees of this department have access. I want to put some files in these folders that employees can edit at the same time and quickly see the changes made by colleagues. I.e, a certain editor should be able to quickly exchange information about the changes being made with its other instances through service files in a shared network folder. Does such a thing exist in nature?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Grigory Bondarenko, 2019-08-27
@yurybx

Having not found a suitable solution, I made a compromise: I put a docm file in a network folder, to which I added a macro that closes the document on idle timeout. With this scheme, simultaneous editing of the document is impossible, but it becomes possible to edit it one by one. Let me explain: in a normal situation, it often happens that one of the employees opened the document and left it in such a state, which is why other employees cannot edit it. The macro excludes such a situation: if no actions are performed on the document for 60 seconds, then it saves and closes the document. The macro also adds a date and username stamp for each new paragraph.

Const interval As Double = 3 ' seconds
Dim prevSelStart As Long
Dim prevSelEnd As Long
Dim timer As Long
Const timeout As Double = 60 ' seconds

Sub AutoOpen()
    selStart = 0
    selEnd = 0
    timer = 0
    Application.OnTime When:=DateAdd("s", interval, Now), Name:="Service", Tolerance:=1
End Sub

Sub Service()

    If Selection.Paragraphs(1).Range.ComputeStatistics(wdStatisticWords) > 0 And _
        Selection.Paragraphs(1).Range.Characters(1) <> "[" Then
        Selection.Paragraphs(1).Range.InsertBefore ("[" & Application.UserName & " " & Date & "] ")
    End If
    
    If Selection.Start = prevSelStart And Selection.End = prevSelEnd Then
        timer = timer + interval
    Else
        timer = 0
        prevSelStart = Selection.Start
        prevSelEnd = Selection.End
    End If
    
    If timer >= timeout Then
        ThisDocument.Close SaveChanges:=wdSaveChanges
    End If
    
    Application.OnTime When:=DateAdd("s", interval, Now), Name:="Service", Tolerance:=1
    
End Sub

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question