What kind of control is this, which lists attachments on a form? RRS feed

  • Question

  • On two forms originally created by someone else, there is a control which hosts a list of attachments associated with the post item. It has a "Show Ruler" icon. But I can't figure out what control it is. I've asked here before and gotten no input, but I was thinking if someone can tell me how to determine its control type, that would be a good start.

    On one form it looks like I want it to:

    On the other form, it looks like this:

    I want the second control to look and act like the first one. If I cut and past the first control onto the second form, it shows up like the screenshot above, that is it does list the attachments, but they're all compressed into the narrow grey section at the top. None of the adjustments offered by the control like splitter and ruler do anything that helps.

    • Edited by rusticloud Thursday, June 13, 2013 5:55 PM
    Thursday, June 13, 2013 5:51 PM


All replies

  • no idea. you can contact people who provide you this.

    with regards, Yuri

    Monday, June 17, 2013 1:39 PM
  • It is not possible to talk to the person that created this form.

    Isn't there a way to determine the type of a control, either in design mode, or via script?

    Monday, June 17, 2013 2:44 PM
  • Unfortunately using something like TypeName() will only show "Control" for most controls, which is not very informative.
    Try putting an instance of the form into design mode and then open the controls toolbox, then right-click on the toolbox and select Custom, then scroll down the list. Look at the checked control libraries and see what's there. It might provide a clue as to what type of control was used for the mystery control.

    Ken Slovak
    Author: Professional Programming Outlook 2007
    "rusticloud" <=?utf-8?B?cnVzdGljbG91ZA==?=> wrote in message news:6269e5ac-f373-4cac-ae2c-c24f442a8589...

    It is not possible to talk to the person that created this form.

    Isn't there a way to determine the type of a control, either in design mode, or via script?

    Ken Slovak MVP - Outlook
    Monday, June 17, 2013 3:55 PM
  • Thanks for that tip Ken.

    The only checked controls are from MSFT Forms 2.0. There are 14 of them if I counted right.

    But am I right that the control I showed in the images can't be a forms 2 control? The only one I can imagine it being is a listbox, but it seems to have features like a ruler control point which listbox does not have.

    Another oddity is that when I went into design mode, and dropped a listbox control on the form to compare is with this unusual control, I couldn't get the pointer to stop dropping new listbox controls onto the form every time I clicked it. It would not revert to 'pointer' from 'listbox' even though the pointer was selected in the toolbox after the first drop.

    Monday, June 17, 2013 4:19 PM
  • Why the controls toolbox pointer wouldn't revert I have no idea, but what you showed wasn't a listbox or combo coontrol. From the image it's obviously some sort of OLE container control, but with custom controls libraries that control could be one of hundreds of controls.

    One way to at least eliminate any controls from MSForms would be an extended If...ElseIf block:

    If Control Is MSForms.Textbox Then

    ElseIf Control Is MSForms.DataObject Then

    ElseIf Control Is MSForms.Frame Then


    Ken Slovak MVP - Outlook

    Monday, June 17, 2013 4:29 PM
  • From a different angle, I don't care about preserving this control per se. I do need the users to be able to see a list of attachments associated with the item. Can someone suggest a way to do that, so that I can get rid of this mystery control?

    One other thing that I find puzzling about this is that I exported these forms as oft and fdm files, and imported them into my local outlook, the control is still there. If these were some kind of ocx control or whatever it is that OL uses for custom controls, why didn't I need to do any kind of installation or registration of a new control?

    Tuesday, June 18, 2013 5:28 PM
  • All that means with the control is that it's probably installed by Windows and is present in all systems. There are lots and lots of controls like that.

    Is it possible to use the normal attachment well control in your form? I'm not sure why that wasn't used from the beginning.

    Ken Slovak MVP - Outlook

    Tuesday, June 18, 2013 5:52 PM
  • Thanks a ton for all of this input...

    What is the "attachment well" control? I'll search after I post this. I have 15 controls in the control toolbox, none seem to be that. I had previously looked in the list of fields for something that might show a list of attachments, but couldn't find one.

    Tuesday, June 18, 2013 6:03 PM
  • The attachment well is the standard control on items that displays attachments. It was probably deleted in the original custom form.

    Ken Slovak MVP - Outlook

    Tuesday, June 18, 2013 7:00 PM
  • I think maybe the controls that my two forms have on them ARE the attachment well.

    I say that because when I create a new task using the built in task form, and drag an attachment on to it, a little icon appears above the scrollbar that is exactly like the icon in the two forms I have.

    I am mystified by the built in attachment well. In OL 2010 when I drag files onto a task, all of them show up on the left hand side of the main text area. I don't see a distinct "attachment well" control. Is the attachment well control kind of side by side with the text area, with no boundary? Even in form design, the attachments seem to be almost embedded into the text area.

    How could the original dev make the attachment well into a distinct control on a separate tab?

    Tuesday, June 18, 2013 7:20 PM
  • A task form doesn't have a separate attachment well control, as a message form would. I had been assuming (not a good idea I know) that the form was a message form, not a task.

    If you look at the Outlook object model you'll see that with tasks the formatted body is RTF (RTFBody). In general, any attachment added to an RTF format item will appear inline to the body of the item.

    You can play with message (email) forms and see how attachments appear depending on how you set the body format of the email (HTML, RTF, Plain text).

    If your forms are task forms, and all users are running the same versions of Outlook, I'd look to see if the different looking forms have the same format, version of the form, and anything else that might differentiate them.

    Ken Slovak MVP - Outlook

    Tuesday, June 18, 2013 8:22 PM
  • Your instinct was right, the form that has two variations on what is probably the attachment well is a message form. For some reason I made my test yesterday with a task form, expecting to see it there too.

    It's almost a certainty that it's simply a formatting issue with the control. I just don't see any way to manipulate control formatting in design mode. The 'bad' control seems oddly split into two portions.

    If it is an attachment well control, can you suggest a way to adjust it that's not obvious? Or, add a fresh copy?

    In both forms, the control is named "Attachments". However if I copy it from the 'good' form and paste onto the 'bad' form, the copy is automatically named "_DocSiteControl1". That gives me a clue re what it is and I'll research it. Oddly, the new _DocSiteControl1 control manifests on the 'bad' form just like it's peer control - split into two portions, which I don't want. If I knew how to defeat that, I'd be home.

    Wednesday, June 19, 2013 4:02 PM
  • Actually, the _DocSiteControl is the body/notes area of the item. And you can have only 1 per form. For RTF messages that is where attachments go, not so for HTML or plain text messages.

    Also, the appearance of how the control looks and works can't be changed:

    However, here's something you might want to try:

    Ken Slovak MVP - Outlook

    Wednesday, June 19, 2013 5:18 PM
  • The tab setting didn't have any impact on my particular control. In fact both controls (good and bad) have identical properties.

    I may need to rebuilt the form, whatever this issue is caused by seems to be pretty obscure. Your help with it is much appreciated.

    Wednesday, June 19, 2013 5:27 PM