If you want to open a Cardbox page or an email from
within a Cardbox macro, you need to issue a command
to Windows to ask it to do this.
You may know that if you open the Windows start menu,
select the Run command, and enter a Web address complete
your Web browser will appear and will open the appropriate
page. If you use the
your email program should open instead.
Cardbox system menu is at the top left-hand corner
of the Cardbox window. You can open it by clicking
on it or by pressing Alt+Space.
If you open the Cardbox system menu, select the Run
command, and enter a complete web address, exactly
same thing should happen, because Cardbox
uses exactly the same Windows function (ShellExecute)
Run command in the Windows start menu. The instructions
given in Using
Macros to Link to External Objects, for opening
web pages and sending emails, depend on the correct
behaviour of this mechanism.
Unfortunately, Microsoft have decided that you need
to be protected from so much ease of use, and in Windows XP,
16-bit programs such as Cardbox 2.0 are not allowed
to use the
mailto: mechanism. This
article describes how you can get round the restrictions
so that you can still make Cardbox macros do what you
A sample solution for http://
Here are some sample commands for starting Internet
Explorer, Netscape, and Opera with a specific Web page.
In each case, the command must be put on a single line,
and the quotation marks should be inserted as shown.
"c:\Program Files\Internet Explorer\iexplore.exe" -nohome http://www.cardbox.com
"C:\Program Files\Netscape\Navigator\Program\netscape.exe" http://www.cardbox.com
"C:\Program Files\Opera\Opera.exe" http://www.cardbox.com
Alternatively, you can use the same Registry
method for http:// as is described for mailto: in the
next section. This is more complicated to set
up but should always yield correct results.
To adjust these solutions to your particular problem:
- Identify which Web browser you are using.
- Use Windows Explorer to find the browser's program
Now, instead of using a Cardbox macro that starts
the Run command with just a Web page address, you can
create a slightly different macro that starts the Run
command and enters the appropriate filename for the
browser before the Web page address. This
is an irritating bit of additional complexity, but
once you have done it, it will remain permanently automated.
Using the Registry to solve mailto:
The commands used to start email programs are complex,
unintuitive, and badly documented, so the best way
of finding out the command to be used is to ask Windows
what command it is using for itself. For this
purpose, you need to run the Registry Editor.
the Start menu in Windows, select "Run...", and enter
regedit (then hit Return or
- The registry editor window is divided into two
the left-hand side you should see "My Documents"
followed by a list of codes starting with
you find yourself in the middle of a list instead,
scroll up to the top of the list.
- Double-click on
should see a long list of codes all of which start
- Scroll down. Eventually the codes beginning
with a dot will be finished, and you will come to an
alphabetical list of longer names. Find the
mailto and double-click on
- You will see a short list of names just under
shell and double-click on it.
- You will see one or two names under
double-click on it.
- You will see one or two names under
command and double-click on it.
- On the right-hand side of the screen, you will
see an entry called
on it, and a dialog box will open up, with a command
line highlighted under "Value Data". Press
Ctrl+C to copy this to the Clipboard, then press
the Cancel button, then close the Registry Editor. Do
not hit Return. Do not press OK.
- Run Notepad or Wordpad and press Ctrl+V so that
you can see the command that you copied.
The exact text of the command that you get out of
this process will depend on how your system has been
set up, but it will look something like this:
IPM.Note /m "%1"
Before you do anything else, make sure that this command
works for you in Cardbox. Open the Cardbox system
menu, select "Run", and paste the command into the
box. If there is a
%1 in the command line, replace
this with an email address (for instance,
there isn't, put an email address at the end of the
command line. Then press OK and see what happens. If
your email program opens up with an appropriately addressed
blank email, everything will work; if not, then you
cannot send emails from Cardbox.
Recording the macro
- Select the Cardbox command Macros, Start Recording,
or press the Record button on the toolbar.
- A small toolbar will appear on top of the Cardbox
window. Press the button marked "Fields". A
list of fields will appear.
- In the list of fields, select the THING field. You'll
see the contents of the field in the current record,
as a confirmation.
- When you're sure that you've chosen the right field,
press the button marked "Copy". This
will copy the contents of the field to the Clipboard.
- Open the Cardbox system menu and select the Run
- Type the whole command that you extracted from
the Registry. You must type this yourself:
you cannot paste it, because Cardbox will record
the act of pasting the command rather than the text
of the command itself.
- If the command contains
%1, use the arrow keys
to move to it, delete it, and leave the cursor exactly
%1 was. If the command doesn't contain
%1, put a space at the end of the command line and
leave the cursor just after that space.
- Press Ctrl+V to paste the name into the command.
- Press OK. A blank email should open, with
the email address that you pasted in from the field.
- Switch back to Cardbox. Press the Stop button
on the toolbar, or select the Cardbox command Macros,
- A dialog box will pop up that lets you give the
macro a name. If you need help on the use of
this dialog box, press the F1 key.