diff -up sc/source/filter/inc/xeescher.hxx sc/source/filter/inc/xeescher.hxx
--- sc/source/filter/inc/xeescher.hxx	2007-05-22 20:55:36.000000000 +0100
+++ sc/source/filter/inc/xeescher.hxx	2007-08-29 13:11:20.000000000 +0100
@@ -79,6 +79,34 @@ private:
     sal_uInt16          mnEntryCount;   /// Number of entries in source range.
 };
 
+class XclMacroHelper : public XclExpControlObjHelper
+{
+protected:
+    XclTokenArrayRef    mxMacroLink;    /// Token array containing a link to an attached macro.
+
+public:
+    explicit            XclMacroHelper( const XclExpRoot& rRoot );
+    virtual             ~XclMacroHelper();
+    /** Writes an ftMacro subrecord containing a macro link, or nothing, if no macro present. */
+    void                WriteMacroSubRec( XclExpStream& rStrm  );
+    /** Sets the name of a macro for object of passed type
+        @return  true = The passed event descriptor was valid, macro name has been found. */
+    bool                SetMacroLink( const ::com::sun::star::script::ScriptEventDescriptor& rEvent, sal_uInt16 nObjType );
+
+    /** Sets the name of a macro 
+        @return  true = The passed macro name has been found. */
+    bool                SetMacroLink( const String& rMacro );
+};
+
+class XclExpShapeObj : public XclObjAny, public XclMacroHelper
+{
+public:
+    explicit            XclExpShapeObj( const XclExpRoot& rRoot, ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape );
+    virtual             ~XclExpShapeObj();
+private:
+    virtual void        WriteSubRecs( XclExpStream& rStrm );
+};
+
 // ----------------------------------------------------------------------------
 
 #if EXC_EXP_OCX_CTRL
@@ -105,22 +133,19 @@ private:
 #else
 
 /** Represents an OBJ record for an TBX form control. */
-class XclExpTbxControlObj : public XclObj, public XclExpControlObjHelper
+class XclExpTbxControlObj : public XclObj, public XclMacroHelper
 {
 public:
     explicit            XclExpTbxControlObj(
                             const XclExpRoot& rRoot,
                             ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape );
 
-    /** Sets the name of a macro attached to this control.
+    /** Sets the name of a macro 
         @return  true = The passed event descriptor was valid, macro name has been found. */
     bool                SetMacroLink( const ::com::sun::star::script::ScriptEventDescriptor& rEvent );
-
 private:
     virtual void        WriteSubRecs( XclExpStream& rStrm );
 
-    /** Writes an ftMacro subrecord containing a macro link, or nothing, if no macro present. */
-    void                WriteMacroSubRec( XclExpStream& rStrm );
     /** Writes a subrecord containing a cell link, or nothing, if no link present. */
     void                WriteCellLinkSubRec( XclExpStream& rStrm, sal_uInt16 nSubRecId );
     /** Writes the ftSbs sub structure containing scrollbar data. */
@@ -128,7 +153,6 @@ private:
 
 private:
     ScfInt16Vec         maMultiSel;     /// Indexes of all selected entries in a multi selection.
-    XclTokenArrayRef    mxMacroLink;    /// Token array containing a link to an attached macro.
     sal_Int32           mnHeight;       /// Height of the control.
     sal_uInt16          mnState;        /// Checked/unchecked state.
     sal_Int16           mnLineCount;    /// Combobox dropdown line count.
diff -up sc/source/filter/inc/xlocx.hxx sc/source/filter/inc/xlocx.hxx
--- sc/source/filter/inc/xlocx.hxx	2007-08-27 15:31:36.000000000 +0100
+++ sc/source/filter/inc/xlocx.hxx	2007-08-29 13:09:56.000000000 +0100
@@ -169,6 +169,14 @@ private:
 #endif
 };
 
+class XclExpShapeObj;
+
+class ShapeInteractionHelper
+{
+public:
+   static XclExpShapeObj* CreateShapeObj(const XclExpRoot& rRoot, const ::com::sun::star::uno::Reference<
+                            ::com::sun::star::drawing::XShape >& xShape );
+};
 // ============================================================================
 
 #endif
diff -up sc/source/filter/xcl97/xcl97esc.cxx sc/source/filter/xcl97/xcl97esc.cxx
--- sc/source/filter/xcl97/xcl97esc.cxx	2007-05-22 21:01:06.000000000 +0100
+++ sc/source/filter/xcl97/xcl97esc.cxx	2007-08-29 13:03:54.000000000 +0100
@@ -258,7 +258,8 @@ EscherExHostAppData* XclEscherEx::StartS
         {
             // #107540# ignore permanent note shapes
             // #i12190# do not ignore callouts (do not filter by object type ID)
-            pCurrXclObj = new XclObjAny( rRoot );   // just a metafile
+            //pCurrXclObj = new XclObjAny( rRoot );   // just a metafile
+            pCurrXclObj = ShapeInteractionHelper::CreateShapeObj( rRoot, rShape );
         }
 	}
 	if ( pCurrXclObj )
diff -up sc/source/filter/excel/xeescher.cxx sc/source/filter/excel/xeescher.cxx
--- sc/source/filter/excel/xeescher.cxx	2007-08-02 14:30:41.000000000 +0100
+++ sc/source/filter/excel/xeescher.cxx	2007-08-29 14:24:09.000000000 +0100
@@ -106,7 +106,8 @@
 #ifndef SC_XESTYLE_HXX
 #include "xestyle.hxx"
 #endif
-
+#include "userdat.hxx"
+#include "drwlayer.hxx"
 using ::rtl::OUString;
 using ::com::sun::star::uno::UNO_QUERY;
 using ::com::sun::star::uno::Reference;
@@ -319,7 +321,7 @@ void XclExpOcxControlObj::WriteSubRecs( 
 
 XclExpTbxControlObj::XclExpTbxControlObj( const XclExpRoot& rRoot, Reference< XShape > xShape ) :
     XclObj( rRoot, EXC_OBJ_CMO_UNKNOWN, true ),
-    XclExpControlObjHelper( rRoot ),
+    XclMacroHelper( rRoot ),
     mnHeight( 0 ),
     mnState( 0 ),
     mnLineCount( 0 ),
@@ -566,21 +568,7 @@ XclExpTbxControlObj::XclExpTbxControlObj
 
 bool XclExpTbxControlObj::SetMacroLink( const ScriptEventDescriptor& rEvent )
 {
-    if( rEvent.ListenerType.getLength() && (rEvent.ListenerType == XclControlObjHelper::GetTbxListenerType( mnObjType )) &&
-        rEvent.EventMethod.getLength() && (rEvent.EventMethod == XclControlObjHelper::GetTbxEventMethod( mnObjType )) &&
-        (rEvent.ScriptType == XclControlObjHelper::GetTbxScriptType()) )
-    {
-        // macro name is stored in a NAME record, and referred to by a formula containing a tNameXR token
-        String aMacroName( XclControlObjHelper::GetXclMacroName( rEvent.ScriptCode ) );
-        if( aMacroName.Len() )
-        {
-            sal_uInt16 nExtSheet = GetLocalLinkManager().FindExtSheet( EXC_EXTSH_OWNDOC );
-            sal_uInt16 nNameIdx = GetNameManager().InsertMacroCall( aMacroName, true, false );
-            mxMacroLink = GetFormulaCompiler().CreateNameXFormula( nExtSheet, nNameIdx );
-            return true;
-        }
-    }
-    return false;
+    return XclMacroHelper::SetMacroLink( rEvent, mnObjType );
 }
 
 void XclExpTbxControlObj::WriteSubRecs( XclExpStream& rStrm )
@@ -711,11 +699,6 @@ void XclExpTbxControlObj::WriteSubRecs( 
     }
 }
 
-void XclExpTbxControlObj::WriteMacroSubRec( XclExpStream& rStrm )
-{
-    if( mxMacroLink.is() )
-        WriteFormulaSubRec( rStrm, EXC_ID_OBJ_FTMACRO, *mxMacroLink );
-}
 
 void XclExpTbxControlObj::WriteCellLinkSubRec( XclExpStream& rStrm, sal_uInt16 nSubRecId )
 {
@@ -941,3 +924,70 @@ void XclExpNote::WriteBody( XclExpStream
 
 // ============================================================================
 
+XclMacroHelper::XclMacroHelper( const XclExpRoot& rRoot ) :
+    XclExpControlObjHelper( rRoot )
+{
+}
+
+XclMacroHelper::~XclMacroHelper()
+{
+}
+
+void XclMacroHelper::WriteMacroSubRec( XclExpStream& rStrm )
+{
+    if( mxMacroLink.is() )
+        WriteFormulaSubRec( rStrm, EXC_ID_OBJ_FTMACRO, *mxMacroLink );
+}
+
+bool 
+XclMacroHelper::SetMacroLink( const ScriptEventDescriptor& rEvent, sal_uInt16 nObjType )
+{
+    if( rEvent.ListenerType.getLength() && (rEvent.ListenerType == XclControlObjHelper::GetTbxListenerType( nObjType )) &&
+        rEvent.EventMethod.getLength() && (rEvent.EventMethod == XclControlObjHelper::GetTbxEventMethod( nObjType )) &&
+        (rEvent.ScriptType == XclControlObjHelper::GetTbxScriptType()) )
+    {
+        // macro name is stored in a NAME record, and referred to by a formula containing a tNameXR token
+        String aMacroName( XclControlObjHelper::GetXclMacroName( rEvent.ScriptCode ) );
+        return SetMacroLink( aMacroName );
+    }
+    return false;
+}
+
+bool
+XclMacroHelper::SetMacroLink( const String& rMacroName )
+{
+    OSL_TRACE("SetMacroLink( macroname:=%s )", rtl::OUStringToOString( rMacroName, RTL_TEXTENCODING_UTF8 ).getStr() );
+    if( rMacroName.Len() )
+    {
+        sal_uInt16 nExtSheet = GetLocalLinkManager().FindExtSheet( EXC_EXTSH_OWNDOC );
+        sal_uInt16 nNameIdx = GetNameManager().InsertMacroCall( rMacroName, true, false );
+        mxMacroLink = GetFormulaCompiler().CreateNameXFormula( nExtSheet, nNameIdx );
+        return true;
+    }
+    return false;
+}
+
+XclExpShapeObj::XclExpShapeObj( const XclExpRoot& rRoot, ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ) : 
+    XclObjAny( rRoot ),
+    XclMacroHelper( rRoot )
+{
+    if( SdrObject* pSdrObj = ::GetSdrObjectFromXShape( xShape ) )
+    {
+        ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pSdrObj );
+        if ( pInfo && pInfo->GetMacro().getLength() )
+            SetMacroLink( XclControlObjHelper::GetXclMacroName( pInfo->GetMacro() ) ); 
+    }
+}
+
+XclExpShapeObj::~XclExpShapeObj()
+{
+}
+
+void XclExpShapeObj::WriteSubRecs( XclExpStream& rStrm )
+{
+    XclObjAny::WriteSubRecs( rStrm );
+    WriteMacroSubRec( rStrm );
+}
+
+// ============================================================================
+
diff -up sc/source/filter/excel/xlocx.cxx sc/source/filter/excel/xlocx.cxx
--- sc/source/filter/excel/xlocx.cxx	2007-08-27 15:31:36.000000000 +0100
+++ sc/source/filter/excel/xlocx.cxx	2007-08-29 13:06:50.000000000 +0100
@@ -549,4 +549,8 @@ void XclExpOcxConverter::ConvertTbxMacro
 #endif
 
 // ============================================================================
-
+XclExpShapeObj* 
+ShapeInteractionHelper::CreateShapeObj(const XclExpRoot& rRoot, const Reference< XShape >& xShape )
+{
+    return new XclExpShapeObj( rRoot, xShape );
+}
--- sc/source/filter/inc/xcl97rec.hxx	2007-01-22 13:20:49.000000000 +0000
+++ sc/source/filter/inc/xcl97rec.hxx	2007-09-04 14:15:19.000000000 +0100
@@ -297,7 +297,7 @@ public:
 
 class XclObjAny : public XclObj
 {
-private:
+protected:
     virtual void                WriteSubRecs( XclExpStream& rStrm );
 
 public:
