Forum Stats

  • 3,852,881 Users
  • 2,264,145 Discussions
  • 7,905,157 Comments

Discussions

Can i BOLD text in the excel sheet through OLE2?

544232
544232 Member Posts: 90
edited Oct 14, 2008 8:28AM in Forms
Hi
Can i BOLD text in the specific cell in the excel sheet through OLE2? can anyone help me?

thanks.
Tagged:

Comments

  • 167634
    167634 Member Posts: 5
    edited Oct 11, 2008 12:12PM
    DECLARE
    cell ole2.obj_type;
    args ole2.obj_type;
    hfontobj2 ole2.obj_type;
    worksheet ole2.obj_type,
    BEGIN
    args := ole2.create_arglist;
    ole2.add_arg (args, 1); -- Row number
    ole2.add_arg (args, 1); -- Column Number
    cell := ole2.get_obj_property (worksheet, 'CELLS', args);
    ole2.destroy_arglist (args);
    hfontobj2 := ole2.GET_OBJ_PROPERTY (cell, 'Font');
    ole2.set_property (hfontobj2, 'Bold', True);
    ole2.RELEASE_OBJ (hfontobj2);
    END;
  • Charon
    Charon Member Posts: 157 Bronze Badge
    This doesn't work.

    I get a WUO-712 stating an error from jacob that the "Bold"-property couldn't be set.

    This with both Office 2003 and Office 2007.

    The specific error-message is :
    WUO-712: Festlegen von eigenschaft nicht möglich: Bold; Exception com.jacob.com.ComFailException: Invoke of: Bold Source: Microsoft Office Excel
    Description: Die Bold-Eigenschaft des Font-Objektes kann nicht festgelegt werden.
This discussion has been closed.