Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sidekick and WordPerfect

Status
Not open for further replies.

GWBaldwin

Technical User
May 3, 2002
4
US
Starfish Software made available in 1995 a WordPerfect macro (SIDEKICK.WCM) to export a Sidekick data file to be formated and used by WordPerfect. When Sidekick 99 came out, the data files needed to be saved as a Sidekick 2 Cardfile.

This has served me well over the years until WordPerfect 9 (2000) came out. I am unable to convert the 'DLLLoad ("export.dll")' code to work with WordPerfect 9.

Has anyone seen a source for an updated SIDEKICK.WCM ??
 
Dear GWBaldwin,
Your question fell through the net and was never answered, how did you get on?
With your experience you may be able to help out on a thread, if you look at this thread first:
thread807-769774
I have re-directed era73(Corey) to the following thread and would be pleased if we could continue from there to save duplication
thread807-626687
Or whatever you all agree between you!


Regards Jim
Check the FAQ area of this Forum for answers (If there are any FAQs!) , it could save you a lot of time and effort and means that links are more likely to be current. Please 'Comment' on them if they are not!
 
Dear Jim & GWBaldwin,

Just a correction: Corey perhaps is the name of the macro's author. Mine is Amit. Hopefully we can get this macro to work.

Here are the instructions on the companion disk for Sidekick 2.0 Following that is the installation instruction from within Word and the error message received. Also find the detailed screen while debugging in Visual basic. Hopefully, some light can be shed on why the macro does not work.

README FILE FOR MICROSOFT WORD 6.0 MACRO

SIDEKICK MAIL MERGE

This SKWW60.WRI file tells you how to do two things:

1. Install the macro
2. Use the macro

1. INSTALLING THE MACRO
------------------------------------------

For the macro to function correctly, you need to place certain files into specific directories on your hard disk.

1. Copy the files SKDLGDLL.DLL and EXPORT.DLL from the temporary directory into your C:\WINDOWS directory.
2. Copy the file SKWW60.DOT into the TEMPLATE subdirectory of the directory you installed Word into (by default, C:\WORD6).

Launch Word. Open the file SKWW60.DOT and follow the instructions onscreen. The instructions walk you through the installation program, which enters the Sidekick macro into your Normal template. This makes the Sidekick macro accessible to you no matter what file you have open in Word.

If you want to assign the macro to a toolbar button, follow these steps.

1. Close SKWW60.DOT if you haven't already.
2. Create a new file.
3. Choose Tools|Customize. The Customize dialog box appears.
4. Select Macros from the Categories list. The Sidekick macro appears in the Macros list.
5. Select Sidekick from the Macros list, and drag it to the toolbar. A button appears where you drop the macro, and the Custom Button dialog box appears.
6. Select an appropriate graphic for the button and chose Assign. Close the Customize dialog box.

2. USING THE MACRO
--------------------------------

The Sidekick Mail Merge macro allows you to import a Sidekick cardfile into Microsoft Word 6.0 for use in a mail merge. To run the macro, click the toolbar button you assigned to it using the above steps. If you have not assigned a button to it, choose Tools|Macro. The Macro dialog box appears. Select Sidekick from the list of available macros, and click Run.

You will be prompted to choose a Sidekick cardfile. After you choose one, the macro will automatically create a text-only version of the cardfile (with a .TXT extension) and import using the Word Mail Merge feature. After a moment, a new document will appear with the usual Word Mail Merge toolbar. Create your mail merge template in this new document. Refer to your Word manuals for further instructions on creating a mail merge.

NOTE: If you like, you can delete the .TXT versions of the cardfiles.

INSTRUCTIONS IN WORD:

To install the Sidekick Mail Merge macro, follow these steps.

1. Display the Starbar toolbar.
2. Choose View|Toolbars.
3. Check the Starbar box.
4. Click OK.
5. Click the button on the Starbar toolbar.
The macro is now installed! Close SKWW60.DOT

My comments:

On running the macro, I get the following error in Microsoft Visual basic:
Run time error "48"
File not found Skdlgdll.dll

When I run debug, I get the following:
(The cursor highlights the line "CHOOSE_RESULT = OpenDlg(hwnd, szfn$, szfilter$, szExt$, szTitle$, nHelpID)
If CHOOSE_RESULT <> 1 Then Continue = 0)

Dim szfn$
Dim szfilter$
Dim szExt$
Dim szTitle$
Dim nHelpID
Dim CHOOSE_RESULT
Rem \\\\\\\\\\\\\\\\\\\ CHOOSING CARDFILE
hwnd = 0
szfn$ = &quot;&quot;
szfilter$ = &quot;Sidekick Cardfile (*.SDB)|*.sdb||&quot;
szExt$ = &quot;sdb&quot;
szTitle$ = &quot;Choose Sidekick Cardfile&quot;
nHelpID = 0
CHOOSE_RESULT = OpenDlg(hwnd, szfn$, szfilter$, szExt$, szTitle$, nHelpID)
If CHOOSE_RESULT <> 1 Then Continue = 0
SourceName$ = szfn$
End Sub

Private Sub ConvertCardfile()
Dim lpSrcName$
Dim lpExt$
Dim lpTarName$
Dim EXPORT_RESULT
Dim NameLength
Dim NameNoExt$
Rem \\\\\\\\\\\\\\\\\\\ CONVERTING CARDFILE
lpSrcName$ = SourceName$
lpExt$ = &quot;TXT&quot;
lpTarName$ = &quot;&quot;
EXPORT_RESULT = SKW_ExportCardfile(lpSrcName$, lpTarName$, lpExt$)
If EXPORT_RESULT = -1 Then WordBasic.MsgBox &quot;Out of memory. Shut down some programs and try again.&quot;
If EXPORT_RESULT = -2 Then WordBasic.MsgBox &quot;The selected cardfile is in use. Close it and try again. Or, change the access rights to the file and try again.&quot;
If EXPORT_RESULT = -3 Then WordBasic.MsgBox &quot;Word could not create a converted version of the cardfile. Remove any previously converted versions and try again.&quot;
If EXPORT_RESULT = -4 Then WordBasic.MsgBox &quot;The selected file is not a Sidekick 2.0 for Windows cardfile.&quot;
If EXPORT_RESULT = -5 Then WordBasic.MsgBox &quot;The selected file is not a Sidekick 2.0 for Windows cardfile.&quot;
If EXPORT_RESULT <> 1 Then Continue = 0
If EXPORT_RESULT = 1 Then
NameLength = Len(SourceName$)
NameLength = NameLength - 3
NameNoExt$ = WordBasic.[Left$](SourceName$, NameLength)
TargetName$ = NameNoExt$ + &quot;TXT&quot;
End If
End Sub

Private Sub OpenDB()
WordBasic.FileNew Template:=&quot;Normal&quot;, NewTemplate:=0
WordBasic.MailMergeMainDocumentType 0
WordBasic.MailMergeOpenDataSource Name:=TargetName$, ConfirmConversions:=0, ReadOnly:=0, LinkToSource:=1, AddToMru:=0, PasswordDoc:=&quot;&quot;, PasswordDot:=&quot;&quot;, Revert:=0, WritePasswordDoc:=&quot;&quot;, WritePasswordDot:=&quot;&quot;, Connection:=&quot;&quot;, SQLStatement:=&quot;&quot;, SQLStatement1:=&quot;&quot;
WordBasic.MailMergeEditMainDocument
End Sub

 
Dear Amit,
Easy to understand my confusion about the name I guess!

The only thing that seems odd about the installation routine is that at no time in it do the .dll files get registered with Windows...
I still think that the version of Word that you are using it with, may not be supported, but I hope I am wrong.

Regards Jim
Check the FAQ area of this Forum for answers (If there are any FAQs!) , it could save you a lot of time and effort and means that links are more likely to be current. Please 'Comment' on them if they are not!
 
Thank you for your replies. I have continued to use WordPerfect 6.1 with this macro. I am still interesting in porting it over to WordPerfect 9 or 10. Appreciate your comments. Gregory
 
Dear Amit,
If you could possibly send me the two .dll files
SKDLGDLL.DLL and EXPORT.DLL
and paste into this thread a complete copy of the Macro,
I will try to see if they can be altered to suit Word97 (In fact it would be an idea to post them in the VBA forum and ask what needs to be done to make them work in Word97)
That forum at least is familiar with Word Macros...
james.maidment@oceanfree.net
is my email address.


Regards Jim
Check the FAQ area of this Forum for answers (If there are any FAQs!) , it could save you a lot of time and effort and means that links are more likely to be current. Please 'Comment' on them if they are not!
 
Dear Jim,

Thanks for your help. The files are mailed to your email address.

Regards,
Amit
 
Dear Jim,

You raise an interesting point. How does one register DLLs with Windows ? I will also have to check if Sidekick 2.O was a native Windows 95 program.

The version of word that I am trying to use this macro with is Word 97 on Windows 98 system.

Regards,
Amit
 
Dear Amit,
A simpler way:
Which says:
Go to the Run Item on the Start Menu and type:
regsvr32 <path and filename of .dll or .ocx>

You said: SKDLGDLL.DLL and EXPORT.DLL from the temporary directory into your C:\WINDOWS directory.
In your case I think it should be (I guess)

regsvr32 C:\Windows\SKDLGDLL.dll
and
regsvr32 C:\Windows\EXPORT.dll
See how that works!
Just a quick question do these .dll files come from Sidekick, or are they from the Companion disc?
It occurs to me that if you are using the .dll files from Sidekick98, that could explain why they are not recognised, you would need to use the versions that came with
Sidekick 2.0 for the Macro to see them...
Regards Jim
 
Dear Jim,

Thanks for showing how to register the DLLs. My hunch is that it may solve the problem. Will let you know once I have tried.

The two DLL files are from Companion disks that came with Sidekick 2.0 - I do not have Sidekick 98.

Regards,
Amit
 
Dear Jim,

My Dll files are not getting registered. The regsvr32 dialog says 'LoadLibrary(&quot;C\Windows\skdlgdll.dll&quot;) failed. GetLastError returns 0x0000001f'

Hope you succeed somehow.
Regards,
Amit

 
Dear Amit,
I got the following from:

LoadLibrary(&quot;dskmaint.dll&quot;) failed. GetLastError returns 0x000001f

From Winerror.h, 0x000001f = 31 (ERROR_GEN_FAILURE), which means &quot;A device attached to the system is not functioning.&quot; This behavior can occur if you try to register a Win16 .dll file. For example, typing regsvr32 dskmaint.dll returns this error message.

So where do we go from here?
I think for this moment, I will help my grand-daughter Rachel with her lego...
I'll keep trying on this though.

Regards Jim
Check the FAQ area of this Forum for answers (If there are any FAQs!) , it could save you a lot of time and effort and means that links are more likely to be current. Please 'Comment' on them if they are not!
 
Dear Amit,
Please send me the Template
SKWW60.DOT
But don't expect too much this week as I am going to Cork to visit one of my daughters and I won't be near a computer until Monday next.


Regards Jim
Check the FAQ area of this Forum for answers (If there are any FAQs!) , it could save you a lot of time and effort and means that links are more likely to be current. Please 'Comment' on them if they are not!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top