473,569 Members | 2,834 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="JavaS cript" type="text/JavaScript">
<!--
function MM_openBrWindow (theURL,winName ,features) { //v2.0
window.open(the URL,winName,fea tures);
}

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_ret urnValue = 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_goT oURL('parent',' Template.dot'); return
document.MM_ret urnValue" onfocusout="clo se_window()">La unch 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.c om
Jul 23 '05 #1
2 2341
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="JavaS cript" type="text/JavaScript">
<!--
function MM_openBrWindow (theURL,winName ,features) { //v2.0
window.open(the URL,winName,fea tures);
}

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_ret urnValue = 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_goT oURL('parent',' Template.dot'); return
document.MM_ret urnValue" onfocusout="clo se_window()">La unch 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.c om

Jul 23 '05 #3

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

Similar topics

0
1073
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 my word template file.) The result is: I get correct results but in Datasheet view. I made template with Tools/Office Links/Merge It with Word and...
2
3071
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 data from the DB. Please point me in the right direction on how to approach this. Code samples, links or articles. Anything would work. Thank you...
0
2724
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 to transfer some data to that template and save that modified template on FTP. thnx
1
1106
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 data from the DB. Please point me in the right direction on how to approach this. Code samples, links or articles. Anything would work. Thank you...
1
1078
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 letter. At startup the user should select an employee and then specific information for that employee should inserted in the document at specific...
5
7971
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 number' and 'name'. Now I want to fill these fields from my application and print them: Dim myWord As New Word.Application...
0
1032
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 template would use the integer to retrieve a set of record from a database. I know how to add the dataset and use it in the template. However, how...
0
1555
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 file. strBody="<html>" strBody=strBody&"<head>" ........ set sfile = objFS.createtextfile(strPath, true) sfile.write(strBody) but in this...
0
1284
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 in the first page template (mailing labels) with predefined bookmarks from 1 to 30 just fine. I can force a pagebreak and insert the same template on...
0
7693
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7917
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
5501
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2105
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.