Page 1 of 1

With block variable not set.

Posted: Tue Aug 05, 2008 8:39 am
by paj
Hi,
I am trying to use the standard VB code found on this site, but am getting the above message when it 'hits' the following line.

progid = xmldom.SelectSingleNode("/xml/progid").Text

Can anyone help.

Thanks
Paj

Dim pdf_printer_name As String
Dim pdf_printer_index As Integer
Dim current_printer_name As String
Dim current_printer_index As Integer
Dim i As Integer
Dim progid As String
Dim xmldom As Object
Dim currentdir As String
Dim pdfwriter As Object

Rem -- Get the directory of the database
currentdir = GetDatabaseFolder

Rem -- Read the info xml
Set xmldom = CreateObject("MSXML.DOMDocument")
xmldom.Load (currentdir & "\info.xml")

Rem -- Get the program id of the automation object.
progid = xmldom.SelectSingleNode("/xml/progid").Text