Hello all, I have a database I am attempting to use to send faxes via WinFax Pro. I'm trying to use DDE to send fax number / etc. to WinFax. I can make the below code work successfully in Visual Basic, but not in VBA, and am guessing it has something to do with a reference loaded in VB, but not in VBA. How do I get the following code to work in VBA? I get the error "method or data member not found" on the first *.LinkTopic line. None of the *.Link* options are available in VBA, but are in VB...any thoughts? Will LinkPoke even work from Access? I'm using Access 2k / WinFax Pro 10.0.2 / Win XP Pro if it matters....
Thanks in advance....
Private Sub Command7_Click()
FAXNumber$ = "555-1212"
SendTime$ = "06:00:00"
SendDate$ = "12/25/96"
FAXName$ = "Benjamin Smith"
Company$ = "Data Processing Services"
'Subject$ = "Joy of Faxing"
Keyword$ = "fax, joy"
BillingCode$ = "5905-001-xx"
Mode$ = "Fax"
CoverPage$ = "C:\Program Files\Norton SystemWorks\WinFax\COVER\ACCID.CVP"
CoverText$ = "Do enjoy this seasonal message."
'Attachment$ = "C:\Program Files\Norton SystemWorks\WinFax\COVER\ACCID.CVP"
'This is the start of the DDE to WinFax.
'Create the link and disable
'automatic reception in WinFax.
Text5.LinkTopic = "FAXMNG32|CONTROL"
Text5.LinkMode = 2
Text5.LinkTimeout = -1
Text5.LinkExecute "GoIdle"
Text5.LinkMode = 0
'Create a new link with the TRANSMIT topic.
Text5.LinkTopic = "FAXMNG32|TRANSMIT"
Text5.LinkMode = 2
Text5.LinkTimeout = -1
Text5.LinkItem = "sendfax"
'Start DDEPokes to control WinFax.
recip$ = "recipient(" & Chr$(34) & FAXNumber$ & Chr$(34) & "," & Chr$(34) & SendTime$ & Chr$(34) & "," & Chr$(34) & SendDate$ & Chr$(34) & ","
recip$ = recip$ & Chr$(34) & FAXName$ & Chr$(34) & "," & Chr$(34) & Company$ & Chr$(34) & "," & Chr$(34) & Subject$ & Chr$(34) & ","
recip$ = recip$ & Chr$(34) & Keyword$ & Chr$(34) & "," & Chr$(34) & BillingCode$ & Chr$(34) & "," & Chr$(34) & Mode$ & Chr$(34) & "
"
Text5.Caption = recip$
Text5.LinkPoke
'setcoverpage
Text5.Caption = "setcoverpage(" & Chr$(34) & CoverPage$ & Chr$(34) & "
"
Text5.LinkPoke
'fillcoverpage
Text5.Caption = "fillcoverpage(" & Chr$(34) & CoverText$ & Chr$(34) & "
"
Text5.LinkPoke
'attach
'Label1.Caption = "attach(" & Chr$(34) & Attachment$ & Chr$(34) & "
"
'Label1.LinkPoke
'showsendscreen
Text5.Caption = "showsendscreen(""1""
"
Text5.LinkPoke
'resolution
Text5.Caption = "resolution(""HIGH""
"
Text5.LinkPoke
'The SendfaxUI parameter is used only
'when a fax-ready cover page and/or
'attachments are included and you do
'not need to print to the WinFax printer
'driver.
Text5.Caption = "SendfaxUI"
Text5.LinkPoke
'Send the fax.
Text5.LinkTopic = "FAXMNG32|CONTROL"
Text5.LinkMode = 2
Text5.LinkTimeout = -1
Text5.LinkExecute "GoActive"
'Close the link between the applications.
Text5.LinkMode = 0
End Sub
Thanks in advance....
Private Sub Command7_Click()
FAXNumber$ = "555-1212"
SendTime$ = "06:00:00"
SendDate$ = "12/25/96"
FAXName$ = "Benjamin Smith"
Company$ = "Data Processing Services"
'Subject$ = "Joy of Faxing"
Keyword$ = "fax, joy"
BillingCode$ = "5905-001-xx"
Mode$ = "Fax"
CoverPage$ = "C:\Program Files\Norton SystemWorks\WinFax\COVER\ACCID.CVP"
CoverText$ = "Do enjoy this seasonal message."
'Attachment$ = "C:\Program Files\Norton SystemWorks\WinFax\COVER\ACCID.CVP"
'This is the start of the DDE to WinFax.
'Create the link and disable
'automatic reception in WinFax.
Text5.LinkTopic = "FAXMNG32|CONTROL"
Text5.LinkMode = 2
Text5.LinkTimeout = -1
Text5.LinkExecute "GoIdle"
Text5.LinkMode = 0
'Create a new link with the TRANSMIT topic.
Text5.LinkTopic = "FAXMNG32|TRANSMIT"
Text5.LinkMode = 2
Text5.LinkTimeout = -1
Text5.LinkItem = "sendfax"
'Start DDEPokes to control WinFax.
recip$ = "recipient(" & Chr$(34) & FAXNumber$ & Chr$(34) & "," & Chr$(34) & SendTime$ & Chr$(34) & "," & Chr$(34) & SendDate$ & Chr$(34) & ","
recip$ = recip$ & Chr$(34) & FAXName$ & Chr$(34) & "," & Chr$(34) & Company$ & Chr$(34) & "," & Chr$(34) & Subject$ & Chr$(34) & ","
recip$ = recip$ & Chr$(34) & Keyword$ & Chr$(34) & "," & Chr$(34) & BillingCode$ & Chr$(34) & "," & Chr$(34) & Mode$ & Chr$(34) & "
Text5.Caption = recip$
Text5.LinkPoke
'setcoverpage
Text5.Caption = "setcoverpage(" & Chr$(34) & CoverPage$ & Chr$(34) & "
Text5.LinkPoke
'fillcoverpage
Text5.Caption = "fillcoverpage(" & Chr$(34) & CoverText$ & Chr$(34) & "
Text5.LinkPoke
'attach
'Label1.Caption = "attach(" & Chr$(34) & Attachment$ & Chr$(34) & "
'Label1.LinkPoke
'showsendscreen
Text5.Caption = "showsendscreen(""1""
Text5.LinkPoke
'resolution
Text5.Caption = "resolution(""HIGH""
Text5.LinkPoke
'The SendfaxUI parameter is used only
'when a fax-ready cover page and/or
'attachments are included and you do
'not need to print to the WinFax printer
'driver.
Text5.Caption = "SendfaxUI"
Text5.LinkPoke
'Send the fax.
Text5.LinkTopic = "FAXMNG32|CONTROL"
Text5.LinkMode = 2
Text5.LinkTimeout = -1
Text5.LinkExecute "GoActive"
'Close the link between the applications.
Text5.LinkMode = 0
End Sub