473,406 Members | 2,281 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.

Sending ASP Session Variable to Word Macro

Apoligies if this post appears twice, but my first attempt at posting
it was hours ago and there is still no sign of it in the forum (says
five minutes in the confirmation message).

================================================== ===========================

I have some sample code from Microsoft that allows me to start a
specific Word template at the click of a button from within an ASP
page. I would like to modify this in such a way that I can pass an
ASP Session variable to a macro inside the template. Is this actually
possible?

The ASP page (copied below) opens the template, and the AutoOpen macro
is fired displaying a simple msgbox. All I need now is to pass the
macro a Session variable and I'm done, but I'm having great difficulty
finding the correct method to achieve this.

If this isn't possible could someone please put me out of my misery!

TIA,

Colin

<html>
<head>
<title>Start Word Template Test</title>
<script language=vbscript>
Dim objWord

Sub button_onclick()
Call OpenDoc("http://server.domain.net/website/wordtemplate.dot")
End Sub

Sub OpenDoc(strLocation)
Set objWord = CreateObject("Word.Application")
objWord.Visible = true
objWord.Documents.Open strLocation
End Sub
</script>
</head>

<body>

<input type=button name=button value="Create Letter">

</body>
</html>
Jul 19 '05 #1
0 1367

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

Similar topics

3
by: PM | last post by:
I'm trying to make a kind of search history containing the 3 last searched words. So I'm using 3 Session Variables: Word1 / Word2 / Word3. In order to get this history working, I need to put the...
0
by: Nick Jushchyshyn | last post by:
Having a really strange issue with IIS 6 where the session variable does not stay consistant. The first symptom was that database connections (which use a user entered name/PW stored in the...
2
by: Jeff User | last post by:
Greetings I am writing code in a C# web service solution. I want to create an instance of an object (that I created) in a Session variable. I need to check to see if the Session variable has...
9
by: Greg Linwood | last post by:
I'm having difficulty understanding Session state in ASP.Net. It's almost embarrassing asking this as I've been using ASP since it was first released & it really shouldn't be this hard to use -...
5
by: Vishal | last post by:
Hello, I already asked this question in the ASP.NET forums, but no help came. So I am hoping that somebody can help me out. This is really very URGENT me. For my e-commerce application, I...
14
by: Coleen | last post by:
Hi All :-) We have an APSX application using VB.net as the code behind, which uses one or two session variables per page. These Session variables are passed to the final page and calculations...
17
by: Jan Kucera | last post by:
Hi. How can I join session or read Session variables if I have the SessionID (or anything what I can supply)? Imagine I have a external link from my webpages, which opens an application which...
2
by: DLN | last post by:
Hello all, I apologize for the naivety of this question, but I'm wondering whether session variables can ever be modified (somehow) by a client without having to go through code that I write. ...
0
by: damimkader | last post by:
Hi, I'm trying to send emails using a Macro based on an Excel Sheet and the Email Client I'm using is Lotus Notes. OS used - Windows Xp. Language - VB Below is the Code I'm using for doing...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
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...

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.