Error has occurred: No value given... (1 Viewer)

Gasman

Enthusiastic Amateur
Local time
Today, 14:42
Joined
Sep 21, 2011
Messages
14,044
Hi everyone,

I created a mailmerge document in Word 2007 and currently it works off an Excel sheet, the criteria being an empty date in column A.

I was the only one producing the letters, up until last week, where I have been moved sideways and a colleague now has to do it.

I created a button at the top of the sheet to make life easier for the user (at the time, myself), and all has been working fine.

The Excel file and Word document exist in the same folder on a shared drive.

Upon showing my colleague the steps to take, when access the Excel file, it comes up with an error "Error has occurred: No value given for one or more required parameters"

If I continue, it then asks to select the source of the data, so I select the file and then the first sheet.
It then opens the document but all the fields state
'merge field not found in header record of data source', yet I can see them as normal and they are correct.

However I had another colleague try the process and it works fine for them. I have a new computer and I tried it on mine, and it works fine. I'd expect it to work on my old computer that a new colleague is now using and it does.

So colleague Amie cannot create the letters at present and I have no idea as to why not.

I am hoping that someone has perhaps come across this problem before?

I tried repairing Office from the CD and it appeared to repair something as it took a while, but made no difference in this case.


I've checked the references in Word and we have the same except for this Normal (please see Pic) that I cannot find in my System32 folder nor hers.

We do have a Normaliz.dll, so i tried to load that on her PC but it failed.

I have tried another computer and had the same problem and had to map the network share as I did on the PC that I first started with despite using the UNC path?

That computer had a reference to Normal, but at c:\Users\username\Documents\Normal

The code is

Code:
Option Explicit
 
Declare Function apiShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _
ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) _
As Long

 Public Sub OpenFile(ByVal strPathAndFilename As String)
     
    Call apiShellExecute(Application.hwnd, "open", strPathAndFilename, vbNullString, vbNullString, 0)
     
End Sub
Sub Open_Mailmerge()
Dim strDocPath As String

strDocPath = "\\SRVPC\EFS-Shared\JAGB\Natalie & Paul Sipp&ISA\"

' Save workbook first, so we get latest data
ActiveWorkbook.Save

OpenFile (strDocPath & "Customer Letter - SIPP Transactions.docx")

End Sub



The references I and the others that it works for are

Visual Basic for Appliciations
Microsoft Word 12.0 Object Library
OLE Automation
Normal
Microsoft Office 12.0 Object Library

If the colleague that it does not work for opens a blank word document and I look at references, she still does not have a Normal reference. She has the Normal and NormalEmail templates in the Templates folder.?

I renamed the Normal template in the Templates folder and Word created a new one as I expected, but no difference?
TIA

Edit:
I've just managed to access her PC (due to work, it is not available that often) and quickly set up a new mailmerge document using the same source and that works fine, at least in Preview?
 
Last edited:

Users who are viewing this thread

Top Bottom