Skip to main content

Hi everybody

 

I looking for a correctly script what can I use in  Document Macro Blocks

I get from PAA10 but I think that not work correctly because I don’t have in word any fields from IFS

If you have script and you can share with me it will be extra.

I you have script what connect Custom filed from other windows with word in documents management and I,d use it please share me

 

Thanks for any help in this topic 

 

Kamil  

 

Hi Kamil,

What macro did you try and what happened?

 


Hi I use this wersion

 

  1. When I upload the word document for TST doc class and after I edit it from revision I don't see fields from IFS
  2. WHAT DID I WRONG 

  3. IFS Cloud Web version: 23.1.1.20230608190536.0
  4.  my configuration

    PUBLIC FUNCTION WORD_EDIT_MSOFFICE() ON ERROR RESUME NEXT  O_APP.NORMALTEMPLATE.SAVED = TRUE O_APP.VISIBLE = FALSE SET O_DOC = O_APP.DOCUMENTS.OPEN(IFS_CHECK_OUT_PATH & O_FILENAME)     O_APP.APPLICATION.DISPLAYALERTS = 0  FOR EACH STRPROPERTY IN O_APP.ACTIVEDOCUMENT.CUSTOMDOCUMENTPROPERTIES O_APP.ACTIVEDOCUMENT.CUSTOMDOCUMENTPROPERTIES(STRPROPERTY.NAME).DELETE NEXT  FOR I = 0 to UBOUND(O_DOCARRAY,2) IF LEN(O_DOCARRAY(1,I)) > 254 THEN N = 0 FOR D = 1 to LEN(O_DOCARRAY(1,I)) STEP 254 IF N > 0 THEN O_APP.ACTIVEDOCUMENT.CUSTOMDOCUMENTPROPERTIES.ADD "IFS_" & O_DOCARRAY(0,I) & "_" & N, FALSE, "4",  MID(O_DOCARRAY(1,I),D,254) ELSE O_APP.ACTIVEDOCUMENT.CUSTOMDOCUMENTPROPERTIES.ADD "IFS_" & O_DOCARRAY(0,I), FALSE, "4",  MID(O_DOCARRAY(1,I),D,254) END IF N = N + 1 NEXT ELSE O_APP.ACTIVEDOCUMENT.CUSTOMDOCUMENTPROPERTIES.ADD "IFS_" & O_DOCARRAY(0,I), FALSE, "4",  O_DOCARRAY(1,I) END IF NEXT  OBJECT_CONNECTIONS("CONNECTED_OBJECT_TYPES")  O_APP.ACTIVEWINDOW.ACTIVEPANE.VIEW.SEEKVIEW = 0  'UPDATES FIELD VALUES FOR EACH OSTORY IN O_APP.ACTIVEDOCUMENT.STORYRANGES  OSTORY.FIELDS.UPDATE  NEXT   FOR EACH OSHP IN O_APP.ACTIVEDOCUMENT.SHAPES   IF OSHP.TYPE = 17 THEN     O_APP.ACTIVEDOCUMENT.SHAPES(OSHP.NAME).TEXTFRAME.TEXTRANGE.FIELDS.UPDATE   END IF NEXT  O_APP.DOCUMENTS(1).PRINTPREVIEW O_APP.DOCUMENTS(1).CLOSEPRINTPREVIEW O_APP.ACTIVEDOCUMENT.SAVE   O_APP.VISIBLE = TRUE O_APP.ACTIVATE O_APP.WINDOWSTATE = 2 O_APP.WINDOWSTATE = 1 SET O_DOC = NOTHING SET O_APP = NOTHING   END FUNCTION


I cannot help trouble shooting that macro, sorry. You need to find the person who wrote it and ask how to make it work.

Good luck!
 


Reply