Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2002
    Sacramento, CA

    Unanswered: Automation for OLEObject

    Maybe I'm just being thick today, but I can't figure this one out.

    In Access 97 I a trying to embed a Word doc as into a bound object on a form. Thing is I want to automate it.

    Basically, click a button, find the doc, it then automatically gets added to an email as an attachment, and then embedded in a form.

    Its the last part I can't get working.

    Last edited by dragracer; 01-13-03 at 13:04.

  2. #2
    Join Date
    Apr 2002
    Don't know if it will help you straightaway, but I once used the following to include a picture in a form:

    Me![ImageFrame].Picture = path & Me![ImagePath]

    Meaning, if you insert the Ole-object in your form, you've got a lot of properties and methods to play with.
    One special to look at might be:

    Suggest you have a look at Access Help on this .Action also.


  3. #3
    Join Date
    Nov 2002
    Sacramento, CA
    I got a small bit of code that works great

    Dim ctl As Control
    Set ctl = Me!FieldName
    With ctl
    .Enabled = True
    .Locked = False
    .OLETypeAllowed = acOLEEmbedded
    .Class = ""
    .SourceDoc = "c:\attachment.doc"
    .Action = acOLECreateEmbed
    End With

Posting Permissions

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