Old 17-06-2007   #1 (permalink)
Monster Member
 
FuRbY*'s Avatar
 
Join Date: Dec 2006
Location: the immunity syndicate
Age: 30
Posts: 2,998
Rep Power: 5
Default VB6 - OLE and Powerpoints

im having trouble getting a OLE function to open up a power point presentation without me having to enter in the file path in the Sourcedoc section. im trying to use app.path so that when someone else uses it, it will function.

olePP.SourceDoc = (App.Path & "\onlinetut.ppt")
olePP.CreateLink (App.Path & "\onlinetut.ppt")

i put a breakpoint in the .sourcedoc and its not finding the pathway and not opening it automatically or through a double click. help.

Last edited by FuRbY*; 17-06-2007 at 04:27 PM..
FuRbY* is offline   Reply With Quote
Old 17-06-2007   #2 (permalink)
Pro Member
 
chemicalNova's Avatar
 
Join Date: Jun 2006
Age: 19
Posts: 5,593
Rep Power: 8
Default

Have you saved the project yet? If the project isn't saved, App.Path points to the Visual Basic install directory (where the IDE executable is).

chem
__________________
There are no stupid questions... but there are alot of inquisitive idiots.
-
chemicalNova is offline   Reply With Quote
Old 17-06-2007   #3 (permalink)
Monster Member
 
f1tzy's Avatar
 
Join Date: Jan 2007
Location: .net 3.5 SP1
Age: 18
Posts: 2,402
Rep Power: 5
Default

once you export the program this should fix i think, pretty sure i did the same thing with a video file, not much of a programmer though sorry
__________________
;]
f1tzy is offline   Reply With Quote
Old 17-06-2007   #4 (permalink)
Pro Member
 
chemicalNova's Avatar
 
Join Date: Jun 2006
Age: 19
Posts: 5,593
Rep Power: 8
Default

An easier way, is to do this:
Code:
Dim blah As String
blah = App.Path
' BREAKPOINT HERE
When the debugging starts, put your cursor over "blah".. have a look where App.Path points to.. and if you have the right amount of backslashes.

chem
__________________
There are no stupid questions... but there are alot of inquisitive idiots.
-
chemicalNova is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +10. The time now is 05:59 AM.


Powered by vBulletin® Version 3.7.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0