Open MS Word file in track changes mode lazarus / 34-Windows ---------------------------------------------------------------------- noszone · 2021-10-01 08:52 Does anyone knows if Word file can be opened in track changes mode? As per official docs there is no such command line argument. But from manual of document control software (Documenolog, 3d party), their app can do it. How I can see this process: -User is uploading a docx file to web server -The other person have to approve or reject document -Rejected document opening by agent.exe software in track changes mode. After edit send back to web server. -Edited document can seen in web browser in preview on page (with edits, comments, etc). All above steps is okay in my head (there is solution for them), but only the problem that: -Rejected document opening by agent.exe software in track changes mode The one idea is probably use document templates somehow? Any idea is welcome. ---------------------------------------------------------------------- noszone · 2021-10-06 06:50 Found it.. The solution is to use https://wiki.lazarus.freepascal.org/Office_Automation The example code for enable review mode: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program officAuto; {$IFDEF FPC}  {$MODE Delphi}{$ELSE}  {$APPTYPE CONSOLE}{$ENDIF} uses   SysUtils, Variants, ComObj; var  Server, Connect : Variant;  oWord, oPara1, oPara2 : Variant;   w:widestring;   begin    if Assigned(InitProc) then    TProcedure(InitProc);   try    Server := CreateOleObject('Word.Application');  except    WriteLn('Unable to start Word.');    Exit;  end;    // oWord := Server.Documents.Add;  w:= UTF8Decode('c:\mydoc.docx');  Server.Visible := True;    Server.Documents.Open(w);   Server.ActiveDocument.TrackRevisions:=true;  //Server.ActiveDocument.ShowRevisions:=false; end.