3 Replies Latest reply on Dec 2, 2009 10:01 AM by 843804

    Changing font in MSWord with JACOB

      I am trying to create a word document from within a java app.. All I want to do is change the font to Arial (Dialog), and I have the following code, copied from some example code on the web:
              Object font=null;
              try {
                  font = Dispatch.call(selection, "Font","Arial").toDispatch();
              }catch(Exception ex){System.out.println("Error 47: "+ex);}
      and the error I get is this:

      Error 47: com.jacob.com.ComFailException: A COM exception has been encountered:
      At Invoke of: Font
      Description: Member not found.

      As long as we're talking about JACOB, is there any way to create a hyperlink in the document? I can't find an example for it anywhere.. Thanx,