Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Add a new CustomDocumentProperties (2000, VBA)

    Hi guys,

    Does anybody know how can I add a new custom property?
    I've tried with this code:

    Static ppApp As Powerpoint.Application
    Static ppPres As Powerpoint.Presentation

    Set ppApp = CreateObject("powerpoint.application")
    ppApp.Visible = True
    Set ppPres = ppApp.Presentations.Open("c:c.ppt")

    ppPres.CustomDocumentProperties.Add _
    Name:="MySettings", _
    LinkToContent:=False, _
    Value:="Hello World", _
    Type:=msoPropertyTypeString

    But I get the error "Invalid procedure call or argument"

    Anybody can help me?

    Thanks a lot.

  2. #2
    Star Lounger
    Join Date
    Apr 2002
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add a new CustomDocumentProperties (2000, VBA)

    Forget it... I finally got it.
    The problem was with msoPropertyTypeString. I need to pass an integer specifying the type. Like this:

    ppApp.ActivePresentation.CustomDocumentProperties _
    .Add "Complete", False, 4, "hi"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •