473,406 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Question: launching a Word template with the /mmacroname modifierfrom an intranet page

Hello. I'm currently working on a tool for an intranet that allows a
user to launch a Word document template from an HTML page on a corporate
portal.

I would now like to run a particular macro in the template, determined
by the hyperlink selected. But the slash is causing problems - the
hyperlink reads it as a subdirectory.

Here's the code in the page now.

In the header I have this script:

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}

function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}

function close_window() {
window.close();
}

function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2)
eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
In the body of the HTML PAGE, I have the following link:

<a href="#" target="_blank"
onClick="MM_goToURL('parent','Template.dot');retur n
document.MM_returnValue" onfocusout="close_window()">Launch Word
Template</a>
I can't seem to find where I would add the /mmacroname reference.

Any suggestions would be greatly appreciated.

Thanks,
David
da*******@aol.com
Jul 23 '05 #1
2 2329
VK
try to escape / ?

"*Template.dot \/mmacroname"

Jul 23 '05 #2
Thanks, that was my first thought as well. No luck. The link converts
\/ into //

VK wrote:
try to escape / ?

"*Template.dot \/mmacroname"

David Zack wrote: Hello. I'm currently working on a tool for an intranet that allows a
user to launch a Word document template from an HTML page on a corporate
portal.

I would now like to run a particular macro in the template, determined
by the hyperlink selected. But the slash is causing problems - the
hyperlink reads it as a subdirectory.

Here's the code in the page now.

In the header I have this script:

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}

function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}

function close_window() {
window.close();
}

function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2)
eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
In the body of the HTML PAGE, I have the following link:

<a href="#" target="_blank"
onClick="MM_goToURL('parent','Template.dot');retur n
document.MM_returnValue" onfocusout="close_window()">Launch Word
Template</a>
I can't seem to find where I would add the /mmacroname reference.

Any suggestions would be greatly appreciated.

Thanks,
David
da*******@aol.com

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andrej | last post by:
Hello. I tried to export query results to word document. I created a short macro: OpenQuery (View = Datasheet), ApplyFilter, OutputTo (Output Format = rtf, for Template file I paste a shortcut to...
2
by: Ruslan Shlain | last post by:
Hello everyone. I have a question that I tried to find an answer over the weekend but did not succeeded. I have a Word template with a couple of "tags" ( <<My Tag>>) that I need to replace with...
0
by: Vrushal | last post by:
Hii HOW TO: Transfer Data to an word Template by Using ASP.NET What i m trying to do is .. User will select the word Template (dot file) from the asp.net page, and when i ll click SAVE i want...
1
by: Ruslan Shlain | last post by:
Hello everyone. I have a question that I tried to find an answer over the weekend but did not succeeded. I have a Word template with a couple of "tags" ( <<My Tag>>) that I need to replace with...
1
by: Michael Steffen | last post by:
Hi all, I'm trying to create a Word Template, that reads and xml file when a new document is created. The xml file contains information of all employees, that use the template to create a...
5
by: steven | last post by:
Hello, I've created a Word-template for a letter. I've made some fields in the template (such as 'customer number', 'name', ...) as follows: insert field - DocVariabele with name 'customer...
0
by: Michael D. Reed | last post by:
Using the VS office template to put code behind a word template, I would like to call the template from an other program and pass in an argument repenting a record key. The code behind the word...
0
Gyanchand
by: Gyanchand | last post by:
Actually we need to use a Word template and insert cetain values through ASP. What I have done currently is : Have created a page in HTML and written the HTML to a text file and saved it as an doc...
0
by: larryhord | last post by:
Back in 2005, Raj Singh posted a question about a template problem they were having and no answers were posted. I'm having the same problem with a word template on multiple pages. I am able to fill...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.