Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Function doesn't work anymore

Return to Member Forum

  • Author
    Posts
    • #34338
      Gert Verrept
      Member

      This function returns an error since installing Indesign CC (64bit) on a win 7 64bit system. Tried already Indesign.Application CC or CS9, error styas the same.

      function datum_en_username() {

      var get_username = ‘myName = GetUserName’
      get_username = get_username + ‘Set myInDesign = CreateObject(\”InDesign.Application.CS6.0\”)’
      get_username = get_username + ‘Set myDoc = myInDesign.ActiveDocumentmyDoc.InsertLabel \”getUserName\”, myName’
      get_username = get_username + ‘Function GetUserName()’
      get_username = get_username + ‘Dim objWSHNet, strCurrentUser’
      get_username = get_username + ‘Set objWSHNet = CreateObject(\”WScript.Network\”)’
      get_username = get_username + ‘strCurrentUser = objWSHNet.UserName’
      get_username = get_username + ‘Set objWSHNet = Nothing’
      get_username = get_username + ‘GetUserName = strCurrentUser’
      get_username = get_username + ‘End Function’

      var datum = new Date();

      app.doScript(get_username, ScriptLanguage.visualBasic);
      username = app.activeDocument.extractLabel(‘getUserName’);

      return [datum, username];

      }

    • #34414
      Gert Verrept
      Member

      No problem anymore, found another way to get the same result. I found this on the adobe forums and it works as I want it to be.

      https://forums.adobe.com/message/4021219#4021219

      No problems with the Indesign versions anymore.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.
Forum Ads