@Fax not working

Hey all,

I have an agent that goes to a view. Finds a specific column (overdue_1) and then checks another field (success) to see if a document meets the criteria and is successful. It should be sending a fax to the number I have posted in a text field(SendTo),the format I am using for the number is @thenumber@fax. Currently it will not send a fax although if I replace the number with an email it will send. Has anyone ran into the same problem?Any suggestions are appreciated. I have listed my code below.

Thanks,

Adam

Sub Initialize

'Dim workspace As NotesUIWorkspace

Dim session As NotesSession

'Dim uidoc As NotesUIDocument

Dim db As NotesDatabase

Dim doc As NotesDocument

Dim docMemo As NotesDocument

Dim bodyfield As NotesRichTextItem

Dim style As NotesRichTextStyle

Dim parastyle As NotesRichTextParagraphStyle

Dim view As NotesView



'Set workspace = New NotesUIWorkspace

Set session = New NotesSession

Set db = session.CurrentDatabase

Set view = db.GetView("Tracking" )

'Set uidoc = workspace.CurrentDocument

Set docMemo = New NotesDocument(db)

Set bodyfield = New NotesRichTextItem(docMemo,"Body")

Set style = session.CreateRichTextStyle

Set parastyle = session.CreateRichTextParagraphStyle



Set doc = view.GetFirstDocument

On Error Goto errorhandling



While Not ( doc Is Nothing )

	If doc.overdue_1(0)>= 4 Then

		If doc.success(0) = "N" Then

			

			

			docMemo.Form = "Memo"

			docMemo.SendTo = doc.SendTo(0)

			

		'docMemo.FlowStatus = "This document has not been completed."

			docMemo.Subject = "Audit Alarm"

			

			

			style.Bold = True

			style.FontSize = 30

			style.Effects = EFFECTS_SHADOW

			style.NotesFont = FONT_ROMAN

			parastyle.Alignment = ALIGN_CENTER

			Call bodyfield.AppendParagraphStyle(parastyle)

			Call bodyfield.AppendStyle(style)

			Call bodyfield.AppendText("Audit Request")

			

			style.NotesFont = FONT_ROMAN

			style.Bold = False

			style.FontSize = 12

			style.Effects = EFFECTS_NONE

			Call bodyfield.AppendStyle(style)

			

			Call bodyfield.AddNewline(2)

			

			Call bodyfield.AppendText("On" + " " + doc.datereq1(0) + " " + "we requested secured documents to comply with our audit.")

			Call bodyfield.AddNewline(2)

			Call bodyfield.AppendText("As of today, we have not received the following:")

			parastyle.Alignment = ALIGN_LEFT

			Call bodyfield.AppendParagraphStyle(parastyle)

			Call bodyfield.AddNewline(2)

			

'Policy 1

			If doc.rec1(0) <> "Yes" Then

				style.Bold = True

'parastyle.Alignment = ALIGN_CENTER

				Call bodyfield.AddTab( 3 )

				Call bodyfield.AppendStyle(style)

				Call bodyfield.AppendText("Policy 1:  ")

				style.Bold = False

				Call bodyfield.AppendStyle(style)

				Call bodyfield.AppendText(doc.ins1(0))

				Call bodyfield.AppendText("    " +doc.pol1(0))

				Call bodyfield.AppendText("    " +"Application")

			Else

				style.Bold = True

				style.StrikeThrough = True

'parastyle.Alignment = ALIGN_CENTER

				Call bodyfield.AddTab( 3 )

				Call bodyfield.AppendStyle(style)

				Call bodyfield.AppendText("Policy 1:  ")

				style.Bold = False

				

				Call bodyfield.AppendStyle(style)

				Call bodyfield.AppendText(doc.ins1(0))

				Call bodyfield.AppendText("    " +doc.pol1(0))

				Call bodyfield.AppendText("    " +"Application")

				

				style.Strikethrough = False

				Call bodyfield.AppendStyle(style)

				Call bodyfield.AppendText("    " +"Received!")

				

			End If

			

			

			Call bodyfield.AddNewline(2)

			

'Policy 2

			

			If doc.rec2(0) <> "Yes" Then

				

				style.Bold = True

'parastyle.Alignment = ALIGN_CENTER

				Call bodyfield.AddTab( 3 )

				Call bodyfield.AppendStyle(style)

				Call bodyfield.AppendText("Policy 2:  ")

				style.Bold = False

				Call bodyfield.AppendStyle(style)

				Call bodyfield.AppendText(doc.ins2(0))

				Call bodyfield.AppendText("    " +doc.pol2(0))

				Call bodyfield.AppendText("    " +"Application")

				

			Else

				style.Bold = True

				style.StrikeThrough = True

'parastyle.Alignment = ALIGN_CENTER

				Call bodyfield.AddTab( 3 )

				Call bodyfield.AppendStyle(style)

				Call bodyfield.AppendText("Policy 1:  ")

				style.Bold = False

				

				Call bodyfield.AppendStyle(style)

				Call bodyfield.AppendText(doc.ins2(0))

				Call bodyfield.AppendText("    " +doc.pol2(0))

				Call bodyfield.AppendText("    " +"Application")

				

				style.Strikethrough = False

				Call bodyfield.AppendStyle(style)

				Call bodyfield.AppendText("    " +"Received!")

				

				

				

			End If

			

			Call bodyfield.AddNewline(2)

			

'Policy 3

			If doc.rec3(0) <> "Yes" Then

				style.Bold = True

'parastyle.Alignment = ALIGN_CENTER

				Call bodyfield.AddTab( 3 )

				Call bodyfield.AppendStyle(style)

				Call bodyfield.AppendText("Policy 3:  ")

				style.Bold = False

				Call bodyfield.AppendStyle(style)

				Call bodyfield.AppendText(doc.ins3(0))

				Call bodyfield.AppendText("    " +doc.pol3(0))

				Call bodyfield.AppendText("    " +"Application")

				

				

			Else

				style.Bold = True

				style.StrikeThrough = True

'parastyle.Alignment = ALIGN_CENTER

				Call bodyfield.AddTab( 3 )

				Call bodyfield.AppendStyle(style)

				Call bodyfield.AppendText("Policy 1:  ")

				style.Bold = False

				

				Call bodyfield.AppendStyle(style)

				Call bodyfield.AppendText(doc.ins3(0))

				Call bodyfield.AppendText("    " +doc.pol3(0))

				Call bodyfield.AppendText("    " +"Application")

				

				style.Strikethrough = False

				Call bodyfield.AppendStyle(style)

				Call bodyfield.AppendText("    " +"Received!")

				

			End If

			

			

' Footer Information

			Call bodyfield.AddNewline(2)

			

			

			parastyle.Alignment = ALIGN_CENTER

			Call bodyfield.AppendParagraphStyle(parastyle)

			Call bodyfield.AppendText("These documents can be forwarded to:")

			

			Call bodyfield.AddNewline(2)

			

			Call bodyfield.AppendText("Fax: 1-607-965-2235")

			

			Call bodyfield.AddNewline(1)

			

			Call bodyfield.AppendText("Email: supportingdocs@nycm.com")

			

			Call bodyfield.AddNewline(3)

			

			style.Italic = True

			style.FontSize = 10

			Call bodyfield.AppendParagraphStyle(parastyle)

			Call bodyfield.AppendStyle(style)

			Call bodyfield.AppendText("Visit our Agent Lobby at agents.nycm.com to view Agent Bulletins, Brochures and Newsletters on-line.")

			style.Italic = False	

			style.FontSize = 12

			Call bodyfield.AppendStyle(style)	

			Call bodyfield.AddNewline(8)

			

			Call bodyfield.AppendText("New York Central Mutual Fire Insurance Company")

			Call bodyfield.AddNewline(1)

			Call bodyfield.AppendText("1899 Central Plaza East")

			Call bodyfield.AddNewline(1)

			Call bodyfield.AppendText("Edmeston NY 13335-1899")

			Call bodyfield.AddNewline(1)

			Call bodyfield.AppendText("1-800-234-NYCM (6926) ext.2738")

			

			

			

			

			Call docMemo.Send( True)

		End If

	End If

	parastyle.Alignment = ALIGN_LEFT

	Set doc = view.GetNextDocument( doc )

Wend



'Call doc.ReplaceItemValue( "SendTo", uidoc.FieldGetText("SendTo"))

'Call doc.Save	(True,True)

'Call doc.Send(True,False)

errorhandling: Print "Error: " & Cstr( Err() ) & " " & Error() & " in line: " & Cstr( Erl() )

End Sub

Subject: @Fax not working

Try something simple…place this behind an action button. With VSI-Fax, it works like a charm!

Place this behind an action button…

recipient := vendorcontact+“@”+VendorFax+“@Fax”;

subjectline := “Purchase Order No.” + " " + wonum;

@Command ([EditDocument];“1”);

@Command([MailForward]);

@Command([EditGotoField] ; “EnterSendTo” );

@Command([EditInsertText]; recipient);

@Command ([EditDocument];“1”);

@Command([EditGotoField] ; “Subject” );

@Command( [EditInsertText]; subjectline);

@Command ([EditDocument];“0”);

@PostedCommand([FileSave]);

@Command([FileCloseWindow])

We are using VSI-Fax and it works like a charm!

Subject: RE: @Fax not working

Er, this may be a silly question, but what makes you think that Notes will send a fax if you put @Fax at the end of the address?

Subject: @Fax not working

The To field should look like this…SomeName@FaxNumberwithnodashes@Fax