• Creator
    Topic
  • #4593
    OFER
    Participant

    the applet “messages to word” collect the names in “to” and “cc” together after the title of “receipt” how can we separate them?

    can we control on other software like word and automaticaly print the word message?

  • Author
    Replies
  • #8491
    Support 1a
    Participant

    Here is an updated version of the TypeText function from this applet that should perform the functionality required. Replace the existing function with the one shown below.

    You can control any software that provides a COM interface. This includes much of todays modern software. Check with the application vendor to see if they provide a COM (or Automation) interface. All the MS Office applications provide appropriate interfaces, including Excel, Outlook, Access, etc.

    You can automatically print the Word document by making some changes to your applet. If you are still refering to the Message to Word applet, try adding a new line around line 72: Word.PrintOut. I have not tried this, but it should work.

    Advansys Support

    ‘——————————————————————————-
    ‘ Write messages details in the active documents
    ‘——————————————————————————-
    function TypeText

    dim RecCounter, RecipientEntry, CCRecHolder, BCRecHolder
    dim AttachCount, AttachEntry
    dim RecHolder, AttachHolder

    ‘ Write recipients details in active word document
    If Msg.Recipients.count > 0 then
    for RecCounter = 1 to Msg.Recipients.count
    set RecipientEntry = Msg.Recipients.Item(RecCounter)
    ‘ Recipient type of an address
    Select Case RecipientEntry.TargetType
    Case 0 RecHolder = RecHolder & RecipientEntry.EmailAddress & “, ”
    Case 1 CCRecHolder = CCRecHolder & RecipientEntry.EmailAddress & “, ”
    Case 2 BCRecHolder = BCRecHolder & RecipientEntry.EmailAddress & “, ”
    End Select
    set RecipientEntry = nothing
    next
    End if

    ‘ Write attachments file name in active word document
    If Msg.Attachments.count > 0 then
    for AttachCount = 1 to Msg.Attachments.count
    set AttachEntry = Msg.Attachments.Item(AttachCount)
    AttachHolder = AttachHolder + AttachEntry.DisplayName&” “
    set AttachEntry = nothing
    next
    End if

    Set Selection = Word.Selection
    Selection.Font.Bold = wdToggle
    Selection.TypeText (“Sender: “)
    Selection.Font.Bold = wdToggle
    Selection.TypeText(Msg.Sender.DisplayName)
    Selection.TypeParagraph
    Selection.Font.Bold = wdToggle
    Selection.TypeText(“Date: “)
    Selection.Font.Bold = wdToggle
    Selection.TypeText(Msg.CreationDate&” “)
    Selection.TypeParagraph
    Selection.Font.Bold = wdToggle
    Selection.TypeText(“Email address: “)
    Selection.Font.Bold = wdToggle
    Selection.TypeText(ResolveExternalAddresses)
    ‘ Recipient Type – To
    if RecHolder <> “” then
    Selection.TypeParagraph
    Selection.Font.Bold = wdToggle
    Selection.TypeText(“TO: “)
    Selection.Font.Bold = wdToggle
    Selection.TypeText(RecHolder)
    end if
    ‘ Recipient Type – CC
    If CCRecHolder <> “” then
    Selection.TypeParagraph
    Selection.Font.Bold = wdToggle
    Selection.TypeText(“CC: “)
    Selection.Font.Bold = wdToggle
    Selection.TypeText(CCRecHolder)
    End If
    ‘ Recipient Type – BC
    If BCRecHolder <> “” then
    Selection.TypeParagraph
    Selection.Font.Bold = wdToggle
    Selection.TypeText(“BC: “)
    Selection.Font.Bold = wdToggle
    Selection.TypeText(BCRecHolder)
    End If
    if AttachHolder <> “” then
    Selection.TypeParagraph
    Selection.Font.Bold = wdToggle
    Selection.TypeText(“Attachments: “)
    Selection.Font.Bold = wdToggle
    Selection.TypeText(AttachHolder)
    End If
    Selection.TypeParagraph
    Selection.Font.Bold = wdToggle
    Selection.TypeText(“Subject: “)
    Selection.Font.Bold = wdToggle
    Selection.TypeText(Msg.Subject&” “)
    Selection.TypeParagraph
    Selection.TypeParagraph
    Selection.TypeText(Msg.BodyText&” “)

    ‘ Insert page break
    Selection.InsertBreak wdPageBreak

    end function

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.