Go Shopping Cart Site Map User Panel and Admin English Home

Home > Easypano Forum    Easypano Forum has been upgraded.

Easypano Forum


Welcome Guest Register Login Search The Forum Display List of Forum Members
 All Forums
  Tourweaver
       Forum Search Results
 
Subject Topic: Javascript: Open Word Document Post Reply Post New Topic
Message posted by JerryT on April-02-2010 at 3:14pm
View JerryT's Profile Profile   Search for other posts by JerryT Search   Quote JerryT Quote   Send Private Message Send Msg  
JerryT
Standard Member
Standard Member
United States
December-28-2009
25 Posts

I'm now getting into extending functionality of TW5 using Javascript as an action for buttons to meet my needs.  My TW5 products are used offline (not on the Internet) where I distribute a .exe file.

My first challenge is to Open a Word Document on the hard drive, so my users can pull up a history document about the tour I'm presenting.  They can even modify the document too.  So... I need to open up a local file in Word that exists in the same or a subdirectory to the mytour.exe I've created.  I use the following Javascript:

 

function OpenWordDoc(){

  var w = new ActiveXObject("Word.Application");

  var obj;

  if (w!=null)

  {

    w.Visible=true;

    obj=w.Documents.Open("test.doc");

  }

}

OpenWordDoc()

 

This attempt to open the document, but defaults to look in the C:\windows\system32\ directory, not the directory that I launched the mytour.exe file.

Any idea how I can get the default path to be the path I launched mytour.exe from?  Does EP need to reprogram something?

I am running Win7 Home Premium 64-bit.

Thanks,

Jerry


Message posted by Shayda on January-09-2012 at 8:26am
View Shayda's Profile Profile   Search for other posts by Shayda Search   Quote Shayda Quote   Send Private Message Send Msg  
Shayda
Standard Member
Standard Member
Egypt
January-06-2012
1 Posts
Hey Jerry,
Have tried doing a similar thing but no luck. Was trying to load a gallery from my local machine but nothing happens when i click the button that has the javascript. Did you finally succeed in implementing the same?
I'm using TW 7.

Message posted by leescott on January-09-2012 at 1:28pm
View leescott's Profile Profile   Search for other posts by leescott Search   Visit leescott's Homepage www   Quote leescott Quote   Send Private Message Send Msg  
leescott
Avatar
Gold Member
Gold Member
United States
November-10-2008
314 Posts

Jerry

Have you tried converting the Word doc to a PDF with CutePDF or something, then launching it.

Or try obj=w.Documents.Open("d:\\2.5\\test.doc");



-------------
Lee Scott - Nikon D3/D300/D5000 - |shaved Nikkor 10.5 mm| Manfrotto 055XPROB tripod /322RC2 Grip - Mrotator TCS |CS5 | PW7 & TW6.5 Pro
----
To err is human ... to not try is just plain lazy

If you wish to post a reply to this thread you must first Login
If you are not already registered you must first register

Forum Jump Post Reply Post New Topic
Printer Friendly Version Printable version

Powered by: - Web Wiz Guide Discussion Forums