Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - CreateXML from ribbon
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CreateXML from ribbon

 Post Reply Post Reply
Author
Message
joeliner View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 June 2006
Status: Offline
Points: 273
Post Options Post Options   Thanks (0) Thanks(0)   Quote joeliner Quote  Post ReplyReply Direct Link To This Post Topic: CreateXML from ribbon
    Posted: 12 December 2008 at 1:59pm
Hi,

i have been creating my ribbons from code but now i want to export them to XML and import them to the designer to manage them easily.

I have tried CreateasXML but without much success.

please help.


TIA
Product: Xtreme SuitePro (ActiveX) version 13.1
Platform: Windows XP SP 3
Language: Visual Basic 6 SP6
Back to Top
joeliner View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 June 2006
Status: Offline
Points: 273
Post Options Post Options   Thanks (0) Thanks(0)   Quote joeliner Quote  Post ReplyReply Direct Link To This Post Posted: 12 December 2008 at 2:20pm
am trying this code but it aint workin:

    Dim pxWrite As PropExchange
    'Save data to a binary file
    'pxWrite.CreateAsBinaryFile False, "c:\file.out"
    'ExchangeState pxWrite

    'Save data to a xml file
    pxWrite.CreateAsXML False, "Settings"
    If pxWrite.Valid Then
        ExchangeState pxWrite
        pxWrite.SaveToFile "c:\ribbon.xml"
    End If

Product: Xtreme SuitePro (ActiveX) version 13.1
Platform: Windows XP SP 3
Language: Visual Basic 6 SP6
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 13 December 2008 at 8:24am
Hi,
 
try this
 
   CommandBars.ActiveMenuBar.Customizable = True
   
    Dim pxWrite As PropExchange
    Set pxWrite = CommandBars.GlobalSettings.CreatePropExchange
   
    Dim Options As StateOptions
    Set Options = CommandBars.CreateStateOptions
    Options.SaveOnlyCustomized = False
    Options.SerializeControls = True
   
   
    pxWrite.CreateAsXML False, "DesignerFile"
    CommandBars.DoPropExchange pxWrite, Options
    pxWrite.SaveToFile "c:\ribbon.xml"
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
joeliner View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 June 2006
Status: Offline
Points: 273
Post Options Post Options   Thanks (0) Thanks(0)   Quote joeliner Quote  Post ReplyReply Direct Link To This Post Posted: 13 December 2008 at 4:11pm
thanks oleg.

Product: Xtreme SuitePro (ActiveX) version 13.1
Platform: Windows XP SP 3
Language: Visual Basic 6 SP6
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.