package izyndoc;

import com.jacob.com.*;

/**
 * <p>Title: WordDocCustomProperty</p>
 * <p>Description: Manipulate a CustomDocumentProperty of a Word document.</p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: Izyn Technologies</p>
 * @author Richard Norton
 * @version 1.0
 */

public class WordDocCustomProperty extends com.jacob.com.Dispatch
{

  /**
   * Constructor.
   *
   * @param dispatchCustomProperty Dispatch
   */
  public WordDocCustomProperty(Dispatch dispatchCustomProperty)
  {
    //TAKE OVER THE IDispatch POINTER
    this.m_pDispatch = dispatchCustomProperty.m_pDispatch;
    //NULL OUT THE INPUT POINTER
    dispatchCustomProperty.m_pDispatch = 0;
  }

  /**
   * Get custom property name.
   *
   * @return String
   */
  public String getCustomPropertyName()
  {
    return Dispatch.get(this, "Name").toString();
  }

  /**
   * Set custom property value.
   *
   * @param newValue String
   */
  public void setCustomPropertyValue(String newValue)
  {
    Dispatch.put(this, "Value", new Variant(newValue));
  }

  /**
   * Get custom property value.
   *
   * @return String
   */
  public String getCustomPropertyValue()
  {
    return Dispatch.get(this, "Value").toString();
  }
}