Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. IoleUndoManager with Excel application

IoleUndoManager with Excel application

Scheduled Pinned Locked Moved COM
comdata-structureshelp
1 Posts 1 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jaafar tribak
    wrote on last edited by
    #1

    Hi all, I am trying to control the Undo/Redo Stack in excel but I can't seem to get a pointer to the UndoManager Interface in the ppv out argument when calling the QueryService Method .. it always returns Nothing .. I hope someone can tell me what I am doing wrong .. I think the "SID_SApplicationObject" is not the right SID Note : I am using the olelib.tlb Code :

    Sub Test()
    Dim pUnk As olelib.IUnknown
    Dim IServiceProvider As olelib.IServiceProvider
    Dim IID_IServiceProvider As olelib.UUID
    Dim IID_IOleUndoManager As olelib.UUID
    Dim SID_SApplicationObject As olelib.UUID
    Dim ppv As IUnknown
    CLSIDFromString IIDSTR_IServiceProvider, IID_IServiceProvider
    CLSIDFromString "{0C539790-12E4-11CF-B661-00AA004CD6D8}", SID_SApplicationObject
    Set pUnk = Excel.Application
    pUnk.QueryInterface IID_IServiceProvider, IServiceProvider
    IServiceProvider.QueryService SID_SApplicationObject, IID_IOleUndoManager, ppv
    End Sub

    Any help will be much appreciated Regards.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups