Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jun 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Insert Picture Programmatically (2002)

    Hi

    I have set up an Outlook template (created in FrontPage and then saved as an .OFT) which includes a company logo (.JPG) in the main body of the email. I have used send keys to position the logo and to ensure that it stays where it should ie, above the text (I have found the posts here on send keys very helpful - thank you to those responsible). Also because it's a picture (jpeg) it moves with the appropriate message on reply and forward which is also a requirement (I couldn't seem to do this using Outlook or Outlook Express stationery). It is working really well, however I also need to be able to insert the logo at the top of the email on reply and forward and I am having great difficulty finding the best way to do this. (I have set up icons on the toolbar to run these from) The only way that I can get it too work is to use send keys to open the insert picture dialog and pull in the picture I require. It looks messy as you can see this happening on the screen however I could live with that if only it worked properly every time - unfortunately it doesn't always automatically put in the name of the file I require and therefore stops with the dialog box still on the screen. I have tried to find another way that works without having to use send keys (ideally use the template again as this would be much tidier, or just insert the jpeg without having to open the dialog box) but I'm afraid this is the first time I've done anything like this and I just can't seem to find another way.

    Any suggestions would be greatly appreciated.

    Thank you

    Kristy

  2. #2
    New Lounger
    Join Date
    Aug 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert Picture Programmatically (2002)

    Kristy this idea may just solve your problem. if you use word as your email editor, create whatever text and graphic you wish within word get the size and words correct. then block on the entire logo. then click on "Auto correct" within word. give it a shortcut and click add, and ok! then use as necessary. you can make up headers this way or anything else you desire. when you wish to insert the logo into the letter position the cursor and type the shortcut and space bar and hey presto the logo appears!

    hope this helps
    Robert

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Insert Picture Programmatically (2002)

    I have OL 2000 and do not see any way to do it. You might think that Attachments.Add, which offers a "position" parameter would offer some hope, but no, position seems to be ignored for all formats other than RTF, and in RTF, it doesn't display as a picture. I think you're stuck with SendKeys. If you could find a way to load it into the Clipboard as it were to appear in a web page (e.g., when you right-click and copy an image), then Outlook might paste it as an image, but this is beyond my knowledge of the Clipboard API. (In fact, I know of the Clipboard API, but that's about it!)

  4. #4
    New Lounger
    Join Date
    Jun 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert Picture Programmatically (2002)

    Hello again

    Thank you both for your suggestions, I'm afraid that I can't use Word as my email editor for other reasons, but the AutoCorrect is a cool feature which I'm sure I'll use for other things - cheers! I also wish I knew how to use Clipboard API if you think this would work - does anyone know how to do this? Alas I think I shall have to stick with the Send Keys for the time being, does anyone know if there is a way to make these more reliable? Before I move anywhere I am forcing the insertion point to the Subject line so that it can start from a 'known' place, this has helped a lot but I am still having problems with actions overtaking each other. I have tried to use the 'wait' option but I think it only stops when there is a specific place for it to stop ie, when I call up the insert picture dialog box it will stop before I use enter to continue... but I don't want the user to have to do that if I can help it. I'm getting desparate, any help or ideas would be greatly appreciated.

    Thanks

    Kristy

Posting Permissions

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