1 Reply Latest reply on Jun 1, 2007 7:29 AM by insuractive

    Need Help with Word.Application

    The ScareCrow Level 1
      I'm using the code from cf commet.

      This all worked, then I upgraded to cfmx 7 (have now applied update 2)

      All I get now is the following error

      You have attempted to dereference a scalar variable of type class java.lang.String as a structure with members.

      The error occurred in PATH TO FILE: line 75

      73 : paraFont = objParaRange.Font;
      74 : paraFont.Name = docFont;
      75 : docFont.Bold = False;
      76 : docFont.Size = docFontSize;
      77 :

      Everything is exactly the same except for the cf upgrade !!

      Some code is attached...

        • 1. Re: Need Help with Word.Application
          insuractive Level 3
          There does seem to be a couple of discrepancies in your code:

          1) I can't see where the variable docFont comes from
          2) You set paraFont.Name = docFont, which leads me to believe that docFont is a String
          3) However, 3 lines later you are treating it as a structure:
          docFont.Bold = False;
          docFont.Size = docFontSize;

          Should paraFont.Name = docFont.Name?