Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Property setting in VB6


  • Please log in to reply
2 replies to this topic

#1 Al Coda

Al Coda

  • Members
  • 2 posts
  • OFFLINE
  •  
  • Local time:08:06 PM

Posted 17 June 2005 - 01:55 AM

I am a new programmer and wonder if anybody could tell me what I am doing wrong. I want to set the SourceDoc property for an OLE object at runtime and am using the following code: OLE1.SourceDoc = C:\ etc. being the path followed by a backslash and the file name. I have tried it with and without quotes around everything after the =. If I have set the SourceDoc property at design time, it's fine and if I include the above code, it does something because the OLE box becomes blank. It just doesn't do what I want it to. What I am trying to accomplish is enable the user to select a particular file for the OLE box at runtime with a file box which I would pass to the property with a variable. Anyway, any help with this would be appreciated.

BC AdBot (Login to Remove)

 


#2 Batchwood

Batchwood

  • Members
  • 1 posts
  • OFFLINE
  •  
  • Local time:08:06 PM

Posted 30 June 2005 - 08:53 PM

No one has been able to help you so you may find an article to give you some direction here:
http://www.findingfacts.com/L3/L3_2_28_33.php

#3 eleazarmeza

eleazarmeza

  • Members
  • 1 posts
  • OFFLINE
  •  
  • Local time:08:06 PM

Posted 25 July 2005 - 03:57 AM

You should try to use Createlink method, i used it at runtime and it worked. :thumbsup:

Example:

ole1.createlink("c:\i_hope_this_will_be_useful_for_you.doc")

This is kind of funny i was looking for answers and I ended up trying to help someone else.


:flowers:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users