Setting the picture property of an image 
Author Message
 Setting the picture property of an image
Hello,

does anybody know how to set the picture property of an image frame in
Microsoft Outlook at runtime?

Thanks in advance,
Beo Lutz

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Thu, 05 Sep 2002 03:00:00 GMT  
 Setting the picture property of an image
Either I haven't had enough coffee this morning, or I'm up way to early to
follow this, but I think you want to know how to include a gif or jpg from
automation.  If this is the case you would use the HTMLBody property of a
mailitem object and assign the html tags that comprise your message.  Will
give you a heads up that Outlook 2K does not include the picture with the
message, so it is best to use links to graphics that all can access.  (eg.
http://myserver/graphic.jpg)
Quote:

> Hello,

> does anybody know how to set the picture property of an image frame in
> Microsoft Outlook at runtime?

> Thanks in advance,
> Beo Lutz

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Thu, 05 Sep 2002 03:00:00 GMT  
 Setting the picture property of an image
Oops, sorry, no, I believe I didn't make myself clear. Not enough
coffee on my part, I believe ;-) What I'm actually trying to do is to
change the image that is bound to an image frame on an outlook form at
runtime. In VBA there is a function called LoadPicture() that takes a
path name and returns an object that can be assigned to the .picture
property of the image frame, but I can't seem to find it or any
alternative in VB Script.

TIA, Beo

Sent via Deja.com http://www.deja.com/
Before you buy.



Fri, 06 Sep 2002 03:00:00 GMT  
 Setting the picture property of an image
For an image control (objCtrl below) on an Outlook form, you can use:

    objCtrl.Picture = LoadPicture("<file name>"

--
Sue Mosher
Author of
  "Teach Yourself Microsoft Outlook 2000 Programming in 24 Hours"
  "Microsoft Outlook 2000 E-mail and Fax Guide"

Outlook and Exchange solutions at http://www.slipstick.com

Quote:

> Hello,

> does anybody know how to set the picture property of an image frame in
> Microsoft Outlook at runtime?

> Thanks in advance,
> Beo Lutz

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Fri, 06 Sep 2002 03:00:00 GMT  
 Setting the picture property of an image
Thanks, but if that is possible then maybe I have some other problem.
I have code like this:

  Sub Item_Open

    Set iCurrent = Item.GetInspector
    Set pCurrent = iCurrent.ModifiedFormPages("Weitere Informationen")

    pCurrent.Controls("imgFoto").Picture = LoadPicture("C:\img.gif")

  End Sub

And I get "Access denied" when executed. Does that mean there is
something wrong with the path? It works when I set the property
manually though.

TIA,
Beo Lutz

Sent via Deja.com http://www.deja.com/
Before you buy.



Fri, 06 Sep 2002 03:00:00 GMT  
 Setting the picture property of an image
A path problem seems a reasonable explanation.
--
Sue Mosher
Author of
  "Teach Yourself Microsoft Outlook 2000 Programming in 24 Hours"
  "Microsoft Outlook 2000 E-mail and Fax Guide"

Outlook and Exchange solutions at http://www.slipstick.com

Quote:

> Thanks, but if that is possible then maybe I have some other problem.
> I have code like this:

>   Sub Item_Open

>     Set iCurrent = Item.GetInspector
>     Set pCurrent = iCurrent.ModifiedFormPages("Weitere Informationen")

>     pCurrent.Controls("imgFoto").Picture = LoadPicture("C:\img.gif")

>   End Sub

> And I get "Access denied" when executed. Does that mean there is
> something wrong with the path? It works when I set the property
> manually though.



Sat, 07 Sep 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Set Image.Picture Stretch property.

2. Set Nothing to user-defined Image property through Properties Window

3. Replacing a pictures properties with another pictures properties

4. Saving and retrieving image control picture property in MSSQL7

5. Picture Property Of Image

6. ActiveX - Image Control - Picture Property

7. aving and retrieving image control picture property in MSSQL7

8. Image array Picture Property

9. Saving a Picture Box's IMAGE property

10. Image property stops picture resizing correctly ?

11. How to copy hDC property of picture control to an image control

12. Image Datatype - binding datasource to a controls picture property

 

 
Powered by phpBB® Forum Software