Welcome1.gif (9491 bytes)

winclip4.gif (5185 bytes)Copying Your Q&A Data
to Windows Programs
Just Got a Whole Lot Easier

WinClip now copies Q&A Write Documents as well as database fields to the Windows Clipboard! See the sidebar at the end of this page. Also, read reviews of WinClip and tips on how to take advantage of WinClip's timesaving power.

If you use—or plan to use—Windows programs along with Q&A, you need a way to copy data from your Q&A databases to whatever Windows programs you’re using.
   What does it take now?
   First, you have to put Q&A in a window.
   Next, you have to click the Mark icon on the toolbar.
   Then you have to carefully drag the mouse over just the data you want to copy.
   Then you have to click the Copy icon to copy it to the Windows Clipboard.
   Then press Alt-Enter again to return to full screen.
   That’s 5 stepsand you’re still not done!
   Now you have to start the other program where you want to use the data.

What if you could do all this with
just one keystroke? Now you can!

   Introducing WinClip—a new Q&A add-on from The Quick Answer.
   WinClip lets you instantly copy any field in any Q&A database to the Windows 95/98/Me/2000 Clipboard!
   You simply press Ctrl-C (or the hotkey of your choice) and BINGO!—the field’s contents (a data value, a name and address, even an entire multi-page letter) are in the Windows Clipboard, ready to paste wherever you need!
   But that’s not all. You can then have WinClip start your Windows program so you can immediately paste the data into it (Ctrl-V or Edit / Paste) and finish the task!
   When you quit the external program, you’re back in Q&A!

WinClip makes working between Q&A and
Windows programs amazingly easy!

• WinClip works with Q&A 4.0 and Q&A 5.0 running in full screen or window mode in Windows. WinClip works in any database as-is—it requires no extra fields or additional programming.

• WinClip is not a TSR—it takes no memory away from Q&A.

• WinClip handles more data than Q&A 5.0’s own clipboard, and lets you effortlessly pass it to any Windows program or any windowed DOS program—including Q&A itself!

• WinClip creates a text file of the data it copies to the Windows Clipboard. You can insert this file in any Q&A database field, display it in Write, or use it in any program that accepts ASCII files.

• WinClip retains the formatting of your Q&A data (what you copy is what you paste) and supports all keyboard characters.

• WinClip comes with a demonstration database you can use to try out various WinClip options. The database includes typical name and address fields and a built-in program (which you can modify for use in your own database) that automatically copies these fields into a preformatted address block for letters, etc. All you have to do is invoke WinClip from the AddressBlock field and the person's complete name and address are in the Windows Clipboard, ready to paste into your Windows word processor.

• WinClip is a snap to install, and the documentation includes a variety of configuration and usage examples.

Get WinClip today, and find out how incredibly easy
it is to share your Q&A data with your other programs!

Specify for Q&A DOS 4.0 or 5.0

$49 including shipping   Order Now!

WinClip for Q&A 5.0 uses one External Programs slot
WinClip for Q&A 4.0 uses one Alternate Programs slot

Use WinClip to Copy Q&A DOS Write
Documents to the Windows Clipboard
(From the December 1998 issue of The Quick Answer)

by Tom Marcellus

After WinClip for Q&A DOS was announced in early 1998, people wanted to know if it would copy Q&A Write documents to the Windows Clipboard to paste into a Windows word processor such as Microsoft Word.

Some folks, after having purchased and installed WinClip, called to say, "It doesn’t work." What "wasn’t working," in invariably turned out, were attempts to use it to copy Q&A documents.

WinClip wasn’t designed to copy documents—it was designed to copy the contents of database fields—and this was clearly stated in the product literature. But still, people wanted to use it to copy documents. Finally, we gave in. With a couple of modifications, now you can use WinClip to copy Q&A Write documents, too. Following are the modifications you’ll need depending on whether you’re using WinClip with Q&A 4.0 or 5.0.

For Q&A 5.0
If you’re using WinClip with Q&A 5.0, here’s what you do to make it copy Q&A Write documents to the Windows Clipboard:

1. Add another selection to your External Programs menu. For the Menu Option, name it something like 8 - WinClip Docs (assuming you have 9 - WinClip for your regular WinClip Menu Option). For the Command Line, enter Winclip.bat (without the %g parameter). No changes to the batch file, Winclip.bat, are necessary.

2. Next, create a new macro that invokes WinClip for copying documents. If you’re using Ctrl-C as the hotkey for the regular WinClip, you might want to use Ctrl-D for the document-copying version. The complete macro looks like this:

<begdef><ctrld><name>"Winclip<sp>doc"<vidoff><ctrlf8>
<capsf4>c:\qa\winclip.txt<enter>y<altf9>6<enddef>

Change the c:\qa\winclip.txt to the path to your Q&A program files.

When you have a document displayed, pressing Ctrl-D will save it in ASCII format to Winclip.txt and invoke the WinClip Docs selection on the External Programs menu. This, in turn, will start WinClip and copy Winclip.txt to the Windows Clipboard. You’ll then be able to paste the document into any Windows program, or into Q&A Write or an expanded database field if you’re running Q&A in a window. Your original Q&A Write document, if already saved to its own filename, will remain intact.

For Q&A 4.0
If you’re using WinClip with Q&A 4.0, all you’ll need to make it copy Q&A Write documents to the Windows Clipboard is a new macro, like this one:

<begdef><ctrld><name>"Winclip<sp>Doc"<vidoff><ctrlf8><home>
c:\qa\winclip.txt<enter>y<esc><esc>z<enddef>

When you have a document displayed, pressing Ctrl-D will save it in ASCII format to Winclip.txt and invoke the WinClip selection (alternate program) on your Q&A Main menu. This, in turn, will start WinClip and copy Winclip.txt to the Windows Clipboard. You’ll then be able to paste the document into any Windows program, or into Q&A Write or an expanded database field if you’re running Q&A in a window. Your original Q&A Write document, if already saved to its own filename, will remain intact.

For either version of Q&A, keep in mind that although WinClip will retain the formatting of your copied document, such as the paragraph structure, indents, and blank lines, it won’t retain enhancements such as fonts, boldfacing and italics. The result you’ll get is the same as when you save a document to ASCII format with Ctrl-F8 (which is what the WinClip macro does.) 

Review
Utility Brings Q&A & Windows Programs Closer Together
(From the April 1998 issue of The Quick Answer)

by Erika Yoxall

I just had a wonderful experience! I was putting together an article for this month’s Quick Answer in Microsoft Word, and I wanted to copy a lengthy programming statement out of my Q&A database into my Word document. I opened my Program Spec, went to the field I needed, pressed Ctrl-C, returned to my Word document and pressed Ctrl-V.

Yes, you read that correctly. I used Ctrl-C / Ctrl-V in Q&A for DOS just like I was copying from one Windows program to another. No marking the text, no six lines at a time, no weird ASCII characters. Just a simple copy and paste. And all without having to leave my database.

It was my first use of a new utility called WinClip from Marble Publications, The Quick Answer’s publisher. All WinClip requires to work is that three files be copied into your Q&A program files directory and a macro added to your macro file. It took me less than five minutes to get the whole thing installed and running. WinClip works on any Q&A database without any modifications.

I can now go into any database field or Spec field, and copy the contents of the field to the Windows Clipboard just by pressing Ctrl-C. Ctrl-V will paste it into any Windows program. Or, I can insert the text file WinClip creates into another Q&A field or Write document. WinClip even includes a batch file that I can modify to automatically launch the Windows document I want to paste my Q&A data into!

WinClip won’t let you copy just a portion of a field, and it has trouble with the extended ASCII graphics characters (non-keyboard characters), but for straight text cut-and-paste, it’s a nice shortcut.

WinClip – Assembling the Ideal Address Block
from the May 1998 issue of The Quick Answer

by Alec Mulvey

WinClip, the latest utility from The Quick Answer, is an easy-to-use yet tremendously productive add-on that benefits anyone who uses a Windows word processor in conjunction with Q&A for DOS. (WinClip was reviewed by Erika Yoxall in last month's issue.) WinClip copies the contents of a Q&A database field to the Windows 95 Clipboard, and can be configured to fire up a Windows program where you can paste the data manually or have a macro in that program paste it for you. For the purpose of this article, I’ll confine myself to what you can do in Q&A before running WinClip.

Names and addresses
What kind of data would you want to copy to a Windows program this way? Well, it could be anything, and to any program, not necessarily just a word processor. The most obvious use, though, is copying a name and address for a mailing label or to paste at the top of a letter or fax. "But," I hear you cry. "I thought WinClip can copy only one field at a time." True, but there's nothing to stop you from assembling as much information as you like into that one field. It could even be an entire letter or fax, compiled by conditional programming right there in the database record. For my example, I'd like to show you how I assemble an "ideal mailing label" address block.

Why is this assembly required? What's wrong with the usual list of fields—first name, last name, company, and the address fields? Well, these may very well serve in the U.S. where addresses are typically brief and standardized. In the U.K. and elsewhere, though, addresses are inconsistent and can be comparatively very long. Here's an actual U.K. address, changed only to protect the innocent:

Mr Tom Williams
Partner
Graham Plunger & Co
Unit 1
Westerham Industrial Park
Lower Road
Westerham
Farnborough
Kent
ME47 2JC

That's 10 lines without the country. On the other hand, an address might be as concise as this:

Mr Tony Blair
10 Downing Street
London
SW1

For convenience, I want to use the same Avery Label stock for my mailing labels and the same window envelope. I don't want to use oversized labels, or risk part of the address not showing in a window envelope. Also, I want to be able to send the name and address to the printer the same way every time—that is, without having to manually edit it to fit just prior to printing.

The way I go about this is to do my "preprocessing" in the Q&A database. I’ve settled on the following fields:

Title Init Surname
Position
Company
Add1
Add2
Add3
Town
County
Postcode
Country

I also use a Salutation field because I might want to address a letter to the "Right Honourable Anthony Blair," yet on the letter itself refer to him as "Tony."

I tried out various Avery labels, fonts and point sizes, and experimented with window envelopes until I settled on a name/address block format that would work reliably. This allowed me a total of six lines for everything. You've probably spotted the snag —some addresses will be too long. But this is where the "preprocessing" comes in.

I created an extra field in the database which I called FullAddress. It’s a multi-line field, six lines high, created with the start field and end field characters, like this:

FullAddress <

 

>

If you use a colon instead of a left angle bracket to start the field, you won’t get a rectangular field. I made the field read-only.

The purpose of the field is twofold. It assembles the information for mailing labels and letters conveniently into one field, ideal for WinClip. It also acts as a "previewer," so I can see how the name and address will look when printed. Although blank lines caused by empty fields are suppressed in a mail-merge, I prefer to see how the name and address will look and make any necessary adjustments when I create the new record. I can then forget about it, and not have a panic attack when running a mail-merge and find there are problems. My programming eliminates any blank lines and also compresses the data. Here’s the programming in the FullAddress field (copied into this document via WinClip, of course!):

#77: FullAddress =
(Title + " ") +(Init+" ")+ Surname+"
" + @Txt(Company <>"",Company + "
") + @Txt(Add1<>"",Add1 + "
") + @Txt(Add2<>"",Add2 + "
") + @Txt(Add3<>"",Add3 + "
") + @Txt(Town<>"",Town + "
") + @Txt(Not ( County="" and Postcode="" ),County
+ @Txt (Ccounty<>""," ") + Postcode + "
") + Country;
FullAddress = @Replace(FullAddress, " "," ")

Let's find out what's going on here.

First, the program (set to Auto Recalc) executes whenever the record is modified. If I have to change the address at some later time, I want the FullAddress field to reflect the change immediately, where I can see it.

The first line concatenates the Title (Mr, Miss, or the like), Init (initials or first name) and Surname. The (Title +" ") construction serves the same purpose as @Txt(Title<>""...etc.). Unfortunately, this doesn’t seem to successfully suppress two blank spaces in a row, so the last line includes an @Replace command to replace any occurrence of two consecutive spaces with one.

The lines down to the Town line add the data from the pertinent field, followed by a hard carriage return inside quotes. (The open quote mark at the end of the line followed by its companion closing quote mark at the beginning of the next line, with a hard carriage return between the two.) Both the field and carriage return are conditional upon the field not being empty (<>"").

The line after Town inserts the county; if not the county, then the postcode and a return character, but only if niether are blank (NOT(County = "" and Postcode...). If there’s both a county and postcode, then the postcode is placed on the same line as the county, separated by a few spaces, the accepted pattern in the U.K. All addresses have a postcode, but some people don't use it. About half my postal addresses include a county.

The last line shows the country. It doesn't need a conditional statement as it's the final address element. Foreign addresses usually don’t need the two additional address fields.

This address contruction suits my needs very well. I can see how the data I’ve added to the record will print on a name and address label or letter. And if I don't like how it looks, I can change it then and there while working in the record.

Occasionally, an address has so many lines that it won't fit in the visible (unexpanded) portion of the FullAddress field. I can easily spot this by the small right arrow Q&A inserts at the bottom of the field. This lets me know I need to edit the address somehow, either by abbreviating it, or by combining two fields into one, with the elements separated by a comma, like this:

Unit 1, Westerham Ind. Pk.

I can make the change, and the FullAddress field will immediately show the newly formatted name and address block.

Adding sophistication
If you’d like a more direct warning that the address is likely to be too long, you can add a simple routine like this:

<If @Add and Company<>"" and Add1<>"" and Add2<>""
and Add3<>"" and Town<>"" and County<>"" Then
{ @Msgbox("Address is Too Long","","Please Edit");
GoTo Add1}

Automating with a macro
WinClip copies the contents of the field where the cursor is. The field must be unexpanded when you press Ctrl-C (or whatever hot key you use) to invoke WinClip. If you’r e using Q&A 5.0, it’s easy to create a macro to move to the target field and run WinClip. Here's how.

Add a new text field to the page where you enter the name and address information. Make it three characters wide. Name it WinClip at the Field Names Spec. Enter the following in the Navigation Spec:

WinClip: < @Macro("WinClip"); GoTo FullAddress

Make the field read-only and assign it a color that will make it stand out from the form’s background and other fields.

Now, when you click on this read-only field, WinClip will spring into life and copy the name and address block to the Windows 95 clipboard, ready for you to paste wherever you need.

Conclusion
Like many businesses, I send a general introductory letter with some marketing materials to each new sales contact. The first thing I do is add their details to my Q&A 5.0 database. WinClip, in conjunction with my FullAddress field, makes it a snap to copy a perfectly-formatted address block to the Windows Clipboard, where it goes straight into my ready-made form letter with my company’s logo.

Alec Mulvey is a Symantec Approved Consultant and Microsoft Certified Trainer. He runs Keyword Software & Consultancy based in Ascot, near London, England. Alec@KeywordSoftware.com, Fax: +44-1344-884-111.

Quick Tip

When WinClip Won't Work

Even if you install WinClip properly, there’s a setting in the Windows 95 Properties for your Q&A shortcut that can prevent WinClip from working.

Right-click on your Q&A shortcut, and select Properties from the popup menu. Click on the Program tab, then click on the Advanced button. The checkbox labeled Prevent MS-DOS-based programs from detecting Windows must be unchecked (empty). If it’s checked, WinClip will create the Winclip.txt file, but won’t be able to run the Windows side of the process (copying the data to the Windows Clipboard).

Fax from Your Database with WinClip and WinFax
(From the March 1998 issue of The Quick Answer)

by Tom Marcellus

With WinClip for Q&A 5.0, you can compose your faxes in a database, and use Windows’ built-in WordPad and Symantec’s WinFax to send them by modem. It makes faxing a breeze, and you’ll be able to search your faxes like any database records.

Start by creating a fax template in a WordPad document. (You should find WordPad in your Accessories group.) You can paste in your letterhead as a graphics file or create your fax header using fonted text. When you’re done, save your template in Word 6.0 format to your Q&A program files directory.

Next, design a new database with fields named Date, From, To, Re and any others you might want. Add a Yes/No field named FaxIt after the others and, to its immediate right, add an invisible no-label field named MakeFax. (Both can be one-character wide.) Right below these, add a page-wide multiline field named Message where you’ll type your fax message.

Make a copy of your WinClip macro. In the copy, change the <altc> to <nokey> and the name to WinClip & Tab. Insert <tab> before the <enddef>, then resave and reload the macro file.

Add the following programs to your FaxIt and Message fields, respectively (your paths might differ):

> If FaxIt = "Y" Then if
Date = "" or From = "" or To = "" or Message = ""
Then { @Msgbox("One or more important fields is blank.","Please fix before faxing.","");

FaxIt = "N"; CHome };

If FaxIt = "Y" then {
MakeFax = @Month$(Date) + " " + @Str(@Dom(Date))
+ ", " + @Str(@Year(Date)) + "
" + "From: " + From + "
" + "To: " + To + "
" + "Re: " + Re + "

" + Message;

@Macro("WinClip & Tab") }


< If FaxIt = "Y" and MakeFax <> "" Then {
FaxIt =
@Shell("C:\Progra~1\Access~1\wordpad.exe fax1.doc");
FaxIt = "N"; Clear(MakeFax) }

Now, to send a fax, simply fill in the fields (Use Initial Values or XLookups), type your fax message, then enter Y in the FaxIt field. The programs will assemble the fax content in the MakeFax field, launch WinClip to copy that content to the Windows Clipboard, then start WordPad and open your fax template.

Click on WordPad’s Paste icon to insert your Q&A fax content, then print to your WinFax printer. Don’t save the changes to Fax1.doc; keep it as a template for future faxes.

Build on these basics to enhance appearance and functionality.

Comments? Looking for something? Write us at inbox@quickanswer.com
Want to submit an article to The Quick Answer? Write to office@quickanswer.com
Phone -  800-780-5474 or 949-722-9127 / Fax - 949-722-9127
Marble Publications, 1927A Harbor Blvd., Costa Mesa, California 92627
Last modified: December 11, 2006