Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using the PreviewPicture property in Visio 2002

Status
Not open for further replies.

DanielKSmith

Programmer
May 13, 2003
2
GB
Hello,
I am trying to capture the Preview Picture of a Visio file to use as a thumbnail. I am using VB.NET to start and manipulate Visio 2002. So far I've discovered the following but I don't have the experience (brains!) to put it all together.
Code:
objRet = object.PreviewPicture
object.PreviewPicture = objExpression
 
objRet - An IPictureDisp object that represents current preview picture.
 
object - Required. An expression that returns a Document object.
 
objExpression - Required. An IPictureDisp object that represents the new preview picture.
(Data from this Url, use all of it, link may be truncated,

The code that I've tried using is:
Code:
        Dim prwObj As stdole.IPictureDisp  
        prwObj = docObj.PreviewPicture
Which doesn't work because IPictureDisp is an interface not an object. Therefore it seems to I need to create an object that implements the IPictureDisp interface in order to then use the PreviewPicture property of the document object.

If anyone has any advice or tips connected this problem I'd be extremely grateful.

Thanks in advance,
Daniel Smith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top