New and Updated Macros

Word Count, Insert Monthly Calendar

September 24, 2013

Word Count

A new macro is available to display word statistics on the current page: Word Count. Word Count macro will display 4 different info as shown below:

Word Count

Insert Monthly Calendar

Also an existing macro got an update: Insert Monthly Calendar. It now has two more options to choose first day of the week (Sunday vs. Monday) and a layout format (Small vs. Large).

Insert Monthly Calendar

Comments

Name
Comment
Omer Atay - 2013-11-09
DrStrangepork, currently you cannot set column widths for a table you just created in a macro. You can however use one of the column widths macros available in macroland to set the column widths after you run your macro and the table is created.
DrStrangepork - 2013-11-06
Thanks Omer, that method worked perfectly!

Next question: I am trying to set fixed widths for these tables as well, but it is not working. Here\'s some example code:

        <ModifyVar name=\"Msg\" op=\"add\" value=\"Enter the new width value (or leave it blank to keep the current width)\" />
        <ModifyVar name=\"ColWidth\" op=\"set\">
          <Prompt type=\"text\" initialValue=\"\" values=\"\" var=\"Msg\" emptyOK=\"true\"></Prompt>
        </ModifyVar>
        <IfVar name=\"ColWidth\" op=\"not\" value=\"\">
          <ModifyProp name=\"isLocked\" op=\"set\" value=\"false\" />
          <ModifyProp name=\"width\" op=\"set\" var=\"ColWidth\" />
        </IfVar>
        <IsRootOp />

This code seems to never work, but I don\'t understand why, and there are no errors in the macroLog.txt file. Any ideas?
Omer Atay - 2013-11-04
DrStrangepork: You can manually generate the link. You can get the link to current page and replace the month name with the next month name. Something like:

<?xml version=\"1.0\" encoding=\"utf-16\"?>
<Macro ...>
  <ModifyVar name=\"curMonthName\" ... />
  <ModifyVar name=\"nextMonthName\" ... />
  <For first=\"Page\">
    <ModifyVar name=\"link\" op=\"set\" prop=\"hyperlink\" />
    <ModifyVar name=\"link\" op=\"set\">
      <Function name=\"String_Split\">
        <Param name=\"string\" var=\"link\" />
        <Param name=\"delimiter\" var=\"curMonthName\" />
      </Function>
    </ModifyVar>
    <ModifyVar name=\"link\" op=\"set\">
      <Function name=\"Array_Join\">
        <Param name=\"array\" var=\"link\" />
        <Param name=\"glue\" var=\"nextMonthName\" />
      </Function>
    </ModifyVar>
  </For>
</Macro>

Other Posts

Show all posts