Forum Replies Created

Viewing 15 replies - 706 through 720 (of 913 total)
  • Author
    Replies
  • in reply to: Create Folder and Copy Current Item #6633
    Support 1a
    Participant

      Yes, you can certainly do this kind of thing with Formativ. Here’s some sample code to help get you started:

      dim iMsg 
      dim iFolder
        
      '-------------------------------------------------------------------------------
      ' Main-Line processing
      '-------------------------------------------------------------------------------
      Sub Main(Client, GWEvent)
         
        on error resume next
        Set iMsg = Client.ClientState.CommandMessage
        
        if not isobject(iMsg) then
          call msgbox("Please select a message to proceed.", vbInformation, "Message Management")
          exit sub    
        end if
        
        ' Create the destination folder
        CreateFolder()
        
        ' Move the message from the current folder into the destination folder's messages collection
        call Client.ClientState.SelectedFolder.messages.move(iMsg.MessageID, iFolder.Messages)
        
        set iMsg = nothing
        set iFolder = nothing
          
      End Sub
       
       
       
      
      '-------------------------------------------------------------------------------
      ' Create the folder if not exists
      '-------------------------------------------------------------------------------
      sub CreateFolder()
         
        dim iRootFolders
       
        groupwise.account.refresh  
        set iRootFolders = groupwise.account.RootFolder.folders
        
        on error resume next
        set iFolder = iRootFolders.ItemByName("People")
            
        if iFolder is nothing then
          set iFolder = iRootFolders.add("People")
        end if
                     
        set iRootFolders = nothing  
        
      end sub
      

      I hope this helps.

      Advansys Support

      in reply to: StatusDlg #6638
      Support 1a
      Participant

        Here is some sample code. You will need to past this into your Sub Main() subroutine:

        dim iStatusDlg
          
          set iStatusDlg = Utilities.NewStatusDialog  
            
          iStatusDlg.title = "Initializing...[Please wait]"
          iStatusDlg.ProgressRange = 3
         
          ' Show the cancel button. 
          iStatusDlg.CanCancel = TRUE
          
          iStatusDlg.show
          
          
          ' Main text
          iStatusDlg.MainText = "Main text goes here"
          
          ' Status text and the progress position
          iStatusDlg.StatusText = 1  
          iStatusDlg.ProgressPosition = 1
          msgbox "Status Position: " & 1
            
          iStatusDlg.StatusText = 2     
          iStatusDlg.ProgressPosition = 2
          msgbox "Status Position: " & 2
          
          iStatusDlg.StatusText = 3  
          iStatusDlg.ProgressPosition = 3
          msgbox "Status Position: " & 3
         
          
          ' if the status cancel button pressed
          if iStatusDlg.Cancel then
            msgbox "Cancel button pressed."
          end if
                  
          set iStatusDlg = nothing
        

        I hope this helps.

        Advansys Support

        in reply to: problems with web bits #5728
        Support 1a
        Participant

          Thanks for the update. As you discovered, the FileSystemObject is a component of the script host.

          Advansys Support

          in reply to: Non-Administrator running Formative Runtime #5725
          Support 1a
          Participant

            At the moment no – the only workarounds is to import the keys as you have suggested, or to install runtime while logged in as the current user.

            Formativ 1.6 is about to be released in the next week or so (which I understand will be a free ungrade from 1.5). 1.6 contains a number of changes to the installation and registry usage that should alleviate this situation somewhat. Watch http://www.advansyscorp.com for an announcement.

            Advansys Support

            in reply to: Composing Item #6632
            Support 1a
            Participant

              Do you mean how do you obtain the message ID from a work in progress message? ItemMessageIDFromView should still give you the appropriate message ID of a saved message (but it will be a ‘proper’ message ID, as opposed to ‘X00’, because saved draft messages exist in the GroupWise message store).

              I feel I am probably not understanding exactly what you want to do. Please provide more details and I’m sure I’ll be able to assist further.

              Advansys Support

              in reply to: Applet sequence !?! #6631
              Support 1a
              Participant

                At the moment the only way to control event sequencing is to rename your applets. Formativ executes applets in response to events in alphabetical order. Try renaming the appropriate applets, i.e. ‘a_Corporate Disclaimer’, ‘b_Terms of use’.

                Advansys Support

                in reply to: On Send event – How to manage exceptions ? #6629
                Support 1a
                Participant

                  The GroupWise.CancelGroupWiseEvent should do what you want. You will need to be using a more recent version of Formativ for this work (1.5.3 or newer I suspect).

                  Here’s an example. Integrate this applet on the email On Send event, restart the client if required, then try to send an email message.

                  Sub Main(Client, GWEvent)
                  
                    if MsgBox("Do you accept the terms and conditions?", vbYesNo, "Formativ") = vbNo then
                      GroupWise.CancelGroupWiseEvent = true
                    end if
                  
                  End Sub

                  I hope this helps.

                  Advansys Support

                  in reply to: Signature problem #5727
                  Support 1a
                  Participant

                    Could you please email an example HTML signature file to support@advansyscorp.com.

                    Thanks,

                    Advansys Support

                    in reply to: Zombies: Undelete-able address book entries #6626
                    Support 1a
                    Participant

                      Eric,

                      A couple of us here have independently confirmed that the example code we posted does work. What were the exact errors you received when you ran our example code as-is?

                      AddressBookEntries is a property of the Object API AddressBook object. Here’s a link to the official Novell documentation for the AddressBook object:

                      Address Book Object documentation

                      Unfortunately, we could not get your code to run. The Object API AddressBook object does not have a count property. Is it possible the code you have posted is not exactly the same code as you are running? Formativ provides two ways to access the address books:

                      1) Via the wrapped address book objects exposed via the GroupWise.AddressBooks property. I suspect this might be the object you are referring to, as the AddressBook object exposed from here does have a Count property. However, this is not the object set our example code is using.

                      2) Via the native Object API, which is exposed via GroupWise.Account.AddressBooks. This object set is actually the native GroupWise Object API, and does have an AddressBookEntries property. This is the object our example code is using.

                      Regards,

                      Advansys Support

                      Thanks,

                      Advansys Support

                      in reply to: Non-Administrator running Formative Runtime #5726
                      Support 1a
                      Participant

                        I suspect Formativ has been installed while logged in as the Administrator on this PC. The Formativ installer creates a number of keys under HKEY_CURRENT_USER. The resolution would be to install Formativ Runtime while logged in as the current user.

                        Advansys Support

                        in reply to: Zombies: Undelete-able address book entries #6627
                        Support 1a
                        Participant

                          You generally need to work backwards when deleting items from a collection. Starting from the beginning, the value of Count decreases after each delete, resulting in some items being left over.

                          The following code should do what you want:

                          Sub Main(Client, GWEvent)
                          
                               Dim objAddressBooks
                               Dim objAddessBook
                               Dim objAddressBookEntry
                               Dim iCount
                               Dim x
                          
                          
                               ' Get the address books object
                               Set objAddressBooks = GroupWise.Account.AddressBooks
                          
                          
                               ' Locate the address book called "Test Account"
                               Set objAddressBook = objAddressBooks.Item("Test Account")
                          
                               
                                iCount = objAddressBook.AddressBookEntries.Count
                               
                               for x = iCount to 1 step -1
                                set objAddressBookEntry = objAddressBook.AddressBookEntries.Item(x)
                                objAddressBookEntry.Delete
                               next
                               
                               
                               Set objAddressBooks = nothing
                          
                            
                          End Sub
                          

                          Advansys Support

                          in reply to: CR in MemoControl #6624
                          Support 1a
                          Participant

                            Thank you very much Ralf!

                            Advansys Support

                            in reply to: CR in MemoControl #6623
                            Support 1a
                            Participant

                              Hello Ralf,

                              MemoControl1.Text contains plain ASCII text. Hard returns are represented by standard CR/LF codes (i.e Char(13) & Chr(10)). Inserting plain text into RTF formatted text will not automatically convert the plain text hard returns in to RTF paragraphs.

                              I suspect you will need to write a plain text -> RTF conversion function that at the very least converts Chr(13) & Chr(10) codes into RTF par’s. Your code would look something like:

                              NewMsg.BodyText = "{rtf1ansiansicpg1252uc1 {bb" & PlainToRTF(MemoControl1.Text) & "b}"

                              I hope this helps.

                              Advansys Support

                              in reply to: Add Text to BodyText #6621
                              Support 1a
                              Participant

                                Thanks for your input Ralf!

                                Advansys Support

                                in reply to: custom fields in address book #6617
                                Support 1a
                                Participant

                                  Thank you for your contribution.

                                  Advansys Support

                                Viewing 15 replies - 706 through 720 (of 913 total)