Forum Replies Created

Viewing 15 replies - 16 through 30 (of 39 total)
  • Author
    Replies
  • MA
    Participant

      Here is some sample code to check the message type of an active view.

      dim oMsg
      dim iMessageID

      ‘ Get the message ID of an active view
      if (groupwise.throwtoken(“ItemMessageIDFromView()”, iMessageID)) then

      if (iMessageID = “X00”) then
      msgbox “This is draft message”
      else
      ‘ Check the box type of the message
      set oMsg = Client.clientstate.commandmessage
      msgbox oMsg.boxtype
      set oMsg = nothing
      end if

      end if

      Thanks
      MA

      in reply to: Find original appointment within the accept event #7405
      MA
      Participant

        quote:


        How does the filter for …Find looks like?


        sFilter = “(APPOINTMENT) AND (<CUSTOM_FIELD, STRING> BeginsWith “”*””)”

        Regards,
        MA

        in reply to: Find original appointment within the accept event #7406
        MA
        Participant

          quote:


          Originally posted by kempf:
          First way i tried is to use the MessageID. But the Messageid of the original appointment and the Messageid of the accept/Decline/Delegate/Delete message isn’t identical. Then i tried the CommonMessageID – the same…..


          Message ID of a composing message and the sent message always different. GroupWise assign a new message ID when the message is sent. May be a better option for you to store the CommonMessageID of the sent message. Please note, accessing a message via the CommonmessageID property results in a read-only instance of the message.

          Thanks
          MA

          in reply to: TRzCheckList Language reference #5536
          MA
          Participant

            quote:


            Originally posted by computech:
            Hello All!

            I have created small form with TRzCheckList object.

            Now i would like to select checked items, however, I find none information about RzListBox.

            How can I select (find ) checked items?

            Thanks!


            See the response from support about the documentation. The code below shows the checked items of the TRzCheckList.

            dim x
            dim iCounter

            iCounter = MainDlg.rzChkList.items.count

            for x = 0 to iCounter -1
            msgbox MainDlg.rzChkList.Items.Strings(x) & vbcrlf & MainDlg.rzChkList.ItemChecked(x)
            next

            Hope this helps.
            MA

            in reply to: Configure Formativ Portal #7395
            MA
            Participant

              quote:


              How can i rename the “Formativ Portal”,


              Select ‘Advansys Formativ’ from Windows ‘Control Panel’ and rename the default portal folder name from the ‘User Interface’ tab.

              quote:


              how can i set the default page? I want that when a user click on the “Formativ” Portal”


              In the ‘User Interface’ tab above you can specify the applet to execute when the portal folder is selected. Here is some sample code to create a portal.

              dim oPortal
              dim oPortals

              set oPortals = GroupWise.PortalManager.Portals
              set oPortal = oPortals.Item(“MyCompany”)

              if oPortal is nothing Then
              set oPortal = oPortals.Add
              oPortal.Caption = “My Company”
              oPortal.TabCaption = “My Company”
              oPortal.ID = “MyCompany”
              oPortal.NavigationControlsEnabled = false
              oPortal.URLInputEnabled = false
              end If
              oPortal.Url = “http://www.advansyscorp.com&#8221;
              oPortal.Show
              oPortals.ActivePortal = oPortal.ID

              set oPortal = nothing
              set oPortals = nothing

              Thanks
              MA

              in reply to: Export Birthday field from GW6.5.5 #7381
              MA
              Participant

                Field can be accessed from the AddresBookEntry.Fields collection. See the GroupWise Object API for more information. You can not access the Birthday field because the field type is set to Reserved. Not sure why, may be this behaviour changed in latest release. The code below shows all fields for an address book entry. Hope this helps.

                dim oBook
                dim oEntry
                dim oField

                set oBook = GroupWise.Account.AddressBooks.Item(1)

                set oEntry = oBook.AddressBookEntries.Item(1)

                for each oField in oEntry.Fields
                msgbox “Field Name: ” & oField.Name & vbcrlf &_
                “Field Value: ” & oField.Value & vbcrlf & _
                “Field Type: ” & oField.FieldDefinition.FieldType
                next

                set oField = nothing
                set oEntry = nothing
                set oBook = nothing

                Thanks
                MA

                in reply to: Find user P.O. & D.O. #7376
                MA
                Participant

                  AddressBookResolve token will return the UserID, PO & Domain information. Hope this helps.

                  msgbox GroupWise.AddressBookResolve(“Test@mycompany.com”,arcPrompt,arcPrompt,””)

                  Thanks
                  MA

                  in reply to: Writing to a text file #7370
                  MA
                  Participant

                    Check the Formativ Language Guide and Visual Basic Script Guide for more information. Here is some of the options available:

                    – Use SaveStringToFile method to save a string value to a file.
                    call utilities.SaveStringToFile(“My log entry”, “c:tempmylog.txt”, true)

                    – Creates a new StringList object and call SaveToFile method to save the strings in the list to a file.
                    dim oList
                    set oList = utilities.StringList
                    oList.add(“Line 1”)
                    oList.add(“Line 2”)
                    oList.SaveToFile(“c:tempmylog.txt”)
                    set oList = nothing

                    Hope this helps.
                    MA

                    in reply to: How to clone a received message #7349
                    MA
                    Participant

                      quote:


                      Originally posted by Immi:
                      What ever I try the message text remains unchanged.


                      The rich text format (RTF) is not valid. In RTF hard return should be replace by par, check RTF Specification for more details.

                      quote:


                      Originally posted by Immi:
                      resulting message is only plain text (no more HTML)


                      I order to create html message in GroupWise you have to supplied TEXT.htm as an attachment to the new message.

                      Thanks
                      MA

                      in reply to: How to clone a received message #7352
                      MA
                      Participant

                        Delete Attachments from Selected Messages solution use AddExistingMessage method of Message objects. See the GroupWise Object API documentation for more details. This method is available only in GroupWise 6.0, SP1 and later versions. The sample code below use the AddExistingMessage method to create a new message based on the selected message. You can update the new message properties (bodytext, attachments, etc) with references to the file locations of the saved or removed messages.

                        ‘——————————————————————————-
                        ‘ Mainline processing
                        ‘——————————————————————————-
                        Sub Main(Client, GWEvent)

                        dim x
                        dim oMsg
                        dim oFolder
                        dim oDraftMsg
                        dim oNewMsg
                        dim oRecipient

                        set oMsg = client.clientstate.commandmessage
                        set oFolder = Client.ClientState.SelectedFolder

                        ‘ Create a draft message and set the subject and body text
                        Set oDraftMsg = oFolder.Messages.Add(fgwDraft)
                        oDraftMsg.subject.plaintext = oMsg.subject.plaintext
                        oDraftMsg.BodyText.PlainText = oMsg.BodyText.PlainText
                        oDraftMsg.BodyText.RTF = oMsg.BodyText.RTF

                        ‘ Setup the recipients
                        for x = 1 to oMsg.Recipients.count
                        set oRecipient = aMsg.Recipients.item(x)
                        call oDraftMsg.Recipients.Add(oRecipient.EmailAddress,,oRecipient.TargetType)
                        set oRecipient = nothing
                        next

                        set oNewMsg = oFolder.Messages.AddExistingMessage(oMsg.Sender.DisplayName, oMsg.Sender.EmailAddress, oMsg.Sender.EmailType, oMsg.CreationDate, oMsg.BoxType, 1, oMsg.Priority, 0, oDraftMsg, oMsg.ModifiedDate)

                        ‘ Move the message to the selected folder if the messages enclosing folder
                        ‘ is not the selected folder
                        call MoveMessages(oNewMsg, oFolder)

                        set oDraftMsg = nothing
                        set oMsg = nothing
                        set oFolder = nothing
                        set oNewMsg = nothing

                        End Sub

                        ‘ Move message to a folder
                        private sub MoveMessages(aMsg, aFolder)

                        dim oEnclosingFolders
                        dim oParentFolder

                        On Error Resume Next
                        set oEnclosingFolders = aMsg.EnclosingFolders
                        if isobject(oEnclosingFolders) then
                        if (oEnclosingFolders.count > 0) then
                        set oParentFolder = oEnclosingFolders.item(1)
                        if isobject(oParentFolder) then
                        if (oParentFolder.FolderID <> aFolder.FolderID) then
                        call oParentFolder.Messages.Move(aMsg, aFolder.messages)
                        end if
                        end if
                        set oParentFolder = nothing
                        end if
                        end if

                        set oEnclosingFolders = nothing
                        end sub

                        Thanks
                        MA

                        in reply to: How to clone a received message #7347
                        MA
                        Participant

                          Cloning a received message is not allowed. You can only clone personal or draft message. Hope this helps.

                          MA

                          in reply to: Adding a FieldDefinition #7331
                          MA
                          Participant

                            quote:


                            On a related problem, is it possible to assign a user-defined field to all copies of an email?


                            See the code below to add user-defined field to a GroupWise message. Hope this helps.

                            dim oMsg
                            dim oField

                            On Error Resume Next

                            set oMsg = nothing
                            set oMsg = Client.ClientState.CommandMessage

                            ‘ Access the user-defined field
                            set oField = nothing
                            set oField = oMsg.Fields.Item(“TagLine”, fgwString)

                            ‘ If user-defined field assigned then display the value otherwise assign new value.
                            ‘ You can also update existing user-defined field value.
                            if not oField is nothing then
                            msgbox “Existing value: ” & oField.value
                            else
                            msgbox “Setting user-defined field value”
                            call oMsg.Fields.Add(“TagLine”, fgwString, “Field value”)
                            end if

                            set oField = nothing
                            set oMsg = nothing

                            in reply to: Adding a FieldDefinition #7328
                            MA
                            Participant

                              The user-defined field type constants egwString in formativ is fgwString Wink. See the Formativ language guide for more details. The code below works for me. Hope this helps.

                              Dim oFieldDef

                              On Error Resume Next
                              Set oFieldDef = Groupwise.Account.FieldDefinitions.item(“TagLine”, fgwString)
                              On Error GoTo 0

                              If Not IsObject(oFieldDef) Then
                              Set oFieldDef = Groupwise.Account.FieldDefinitions.Add(“TagLine”, fgwString)
                              End If

                              [This message was edited by Support 1 on October 11, 2005 at 04:35 PM.]

                              in reply to: Selecting individual contacts for label mail merge. #8764
                              MA
                              Participant

                                The label/document type Avery L7164 not available in my MS Word 2003. If the label type “Avery L7164” exists in your MS Word (Microsoft Word (Tools – Letters and Mailings – Mail Merge) then you can perform the mail merge using any of the two following option.

                                Option 1: Create this kind of mail merge document
                                Choose a document type from the applet, once the merge document created then over-write the document type to “Avery L7164” using MS Word (Tools – Letters and Mailings – Mail Merge) then use MS Word merge to new document option to complete the merge.

                                Option 2: “Associate this mail merge document with the Address Book”
                                Set the existing mail merge document type to “Avery L7164” and select this option to merge into new document. Make sure the Merge to new document check box is checked.

                                Hope this helps
                                – MA

                                quote:


                                Originally posted by stephaniecartwright:
                                Thank-you for this, however, I have already tried both of these options.
                                They both merge straight onto an A4 page. Usually, when mail merging (from Excel to Word for instance) you have the option ‘label options’ to choose the label type, i.e. Avery L7164, this option is not present within the applet. Is there any way of achieving this using the applet, or would we need to arrange custom development for this?
                                Thank-you. Smile


                                in reply to: Selecting individual contacts for label mail merge. #8762
                                MA
                                Participant

                                  You have the following two options:

                                  • In the radio option “Create this kind of mail merge document” select “Mailing Label”. This option will create a new mail merge document.
                                  • In the radio option “Associate this mail merge document with the Address Book”, make sure to set the existing merge document type to Label using Microsoft Word (Tools – Letters and Mailings – Mail Merge)

                                  Hope this helps
                                  – MA

                                  quote:


                                  Originally posted by stephaniecartwright:
                                  Thank-you for your helpful repsonse Smile
                                  This worked as desired. However, once I was able to merge the data I found that there was no option to select the label type and the fields simply appeared on separate A4 pages.
                                  Any ideas?

                                  Thank-you,
                                  Kind Regards.


                                Viewing 15 replies - 16 through 30 (of 39 total)