edvardr
asked on
Launching a Word template from a web page
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.Applica tion")
objWord.Visible = true
objWord.Documents.Open "D:\Mine documenter\JOBB\stab\ordre rs\operasj onsorders. 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.
I have tryed:
<SCRIPT LANGUAGE=VBScript>
Set objWord = CreateObject("Word.Applica
objWord.Visible = true
objWord.Documents.Open "D:\Mine documenter\JOBB\stab\ordre
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.
ask for PAQ/Refund in community service.
Regards,
---Pinal
Regards,
---Pinal
ASKER
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
- Geting the paht form my web page over to Word
- The problem with multipel Word sessions
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
<SCRIPT LANGUAGE=VBScript>
Set objWord = CreateObject("Word.Applica
objWord.Visible = true
objWord.Documents.Add "D:\Mine documenter\JOBB\stab\ordre
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.