[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Launching a Word template from a web page

Posted on 2004-10-02
5
Medium Priority
?
344 Views
Last Modified: 2013-11-06
I'm trying to launch a Word template from a web page, but can not figure out how to do that. When the template launch I need a macro to start runing. It it starts using AutoNew og the web application runs the macro do not matter.

I have tryed:
<SCRIPT LANGUAGE=VBScript>
   Set objWord = CreateObject("Word.Application")
   objWord.Visible = true
   objWord.Documents.Open "D:\Mine documenter\JOBB\stab\ordrers\operasjonsorders.dot"  
   objWord.UserControl = true

 </SCRIPT>

This however open the template for editing, not as a template. My initial impuls was using objWord.Documents.New .... but that dont work.

I have two other problems with this as well

1) When word starts it dont get focus. This will confuse the users.

2) If Word is open with no documents open the code starts another session of Word insted of opening the template in the session that is already started. This will also confuse the users.


Hope someone is able to help. I have not good knollege in programing, so I nead a code that I more or less is able to copy and paste.
0
Comment
Question by:edvardr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 

Author Comment

by:edvardr
ID: 12208713
Shortly after posting I found the solution:

<SCRIPT LANGUAGE=VBScript>
   Set objWord = CreateObject("Word.Application")
   objWord.Visible = true
   objWord.Documents.Add "D:\Mine documenter\JOBB\stab\ordrers\operasjonsorders.dot"   <-- the correct function is Add
   objWord.UserControl = true

 </SCRIPT>

That also solves then problem with Word not getting focus. But still leaves me with the problem consering multipel Word sessions. And another major problem.

In a macro in the template I use doc_location = ActiveDocument.Path to determin where the new document is to be saved. But now beeing able to operate the template the way I want to the doc_location is empty because the ActiveDocument dont have any path.

I would like the path be sent by IE using the code above to Word so it can be used bye the macro codes.
0
 
LVL 21

Expert Comment

by:pinaldave
ID: 12208991
ask for PAQ/Refund in community service.
Regards,
---Pinal
0
 

Author Comment

by:edvardr
ID: 12210647
But I still would like help with the rest of the problem

- Geting the paht form my web page over to Word
- The problem with multipel Word sessions
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12687974
PAQed with points refunded (500)

modulo
Community Support Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
There is a massive demand for content on the web right now, and it doesn't look like it's going to stop any time soon. But, if you are running a business blog, it's not just enough to offer your audience lots of content. It needs to be high-quality…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question