Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL into Word

Author  Topic 

thekingster
Starting Member

6 Posts

Posted - 2005-12-05 : 15:02:39
Hi,

I currently have an intranet written in asp which logs support calls. What I would like is to be able to have jobsheets for these calls. So I need to be able to click on a link, the asp posts information to word which then mail merges the data from the sql database into a template I create. Upon doing some research I gather some vba may be needed?

Can anyone point me in the right direction for the procedure for this?

Thanks in advance..

Dave

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2005-12-05 : 15:22:57
I can give u some hints:

Start with a Word document:
In mail merge, use the ODBC data source to connect to the SQL Server.

When doing the Mail merge, activate Macro Recording and, by editing that Macro u would get an idea of how to deal with VBA stuff.
Go to Top of Page

thekingster
Starting Member

6 Posts

Posted - 2005-12-05 : 15:30:34
Thanks for the reply, Ill probably be ok with the macro, but how do I get the data from the asp string into the macro, e.g http://www.mysite.com/test.asp?name=dave&surname=king ????
Go to Top of Page

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2005-12-05 : 16:19:27
U don't need to use macro in the real application, instead use the Macro Recorder to understand the VBA code used to deal with SQL Server Mail Merge using ODBC.
Go to Top of Page

thekingster
Starting Member

6 Posts

Posted - 2005-12-05 : 16:33:26
I already knew that tho? Or are you saying I can execute vba code from a website?
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2005-12-06 : 03:26:23
Have you considered using reporting services to create the jobsheets?



steve

-----------

Facts are meaningless. You could use facts to prove anything that's even remotely true!
Go to Top of Page

thekingster
Starting Member

6 Posts

Posted - 2005-12-07 : 18:25:50
I have never used the reporting services, is this the best way to do it... any pointers??? I will do some research.
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2005-12-08 : 03:31:17
It's not neccessarily the "best" way as that depends on your requirements but it may be worth looking into. You may also want to consider just creating an ASP page with everything you need on it and just letting people print that (possibly using CSS to format for Print). I'm sure there will be other possibilities too


steve

-----------

Facts are meaningless. You could use facts to prove anything that's even remotely true!
Go to Top of Page
   

- Advertisement -