PC Review


Reply
Thread Tools Rate Thread

Sending faxes using foxpro and windows 2003sbs

 
 
David
Guest
Posts: n/a
 
      2nd Feb 2004
Dear All

I am having problems with mapi sending faxes with Outlook 2000 sp3, xp and
2003. Early version are ok. I am getting to a point where I think it may be
a security issue. Sending a normal fax is ok, but if I attach a *.tif file
it comes up undeliverable with the message

The Microsoft Fax transport failed to deliver the message to the recipient.
Not all attachments can be rendered.

Here is my code, I have changed the fax number.



objSession = CreateObject("Mapi.Session")
objSession.Logon ()
MESSAGEBOX("CDO version installed is "+trans(objSession.Version))
objMessage = objSession.Outbox.Messages.Add
objMessage.Subject = "Test"
objMessage.Text = "This is a test with an attachment"

objRecipient = objMessage.Recipients.Add
objRecipient.Name = "[FAX:5555555555]"
objRecipient.Type = 1
objRecipient.Resolve ()
objAttachment = objMessage.Attachments.Add()
objAttachment.Position = 0
objAttachment.Type = 1
objAttachment.ReadFromFile("C:\B.TIF")
objAttachment.Source = "C:\B.TIF"
objAttachment.Name = "B.TIF"
objMessage.Send ()
objSession.Logoff

Thank you for any help

David
Anagram Systems Limited
work email: (E-Mail Removed)

 
Reply With Quote
 
 
 
 
Russ Valentine [MVP-Outlook]
Guest
Posts: n/a
 
      2nd Feb 2004
You might want to post in one of the programming groups, too. Not sure
you're going to get the programming traffic in here that could help, unless
Ken Slovak happens by.
--
Russ Valentine
[MVP-Outlook]
"David" <(E-Mail Removed)> wrote in message
news:1u56veiemsc7s$.(E-Mail Removed)...
> Dear All
>
> I am having problems with mapi sending faxes with Outlook 2000 sp3, xp and
> 2003. Early version are ok. I am getting to a point where I think it may

be
> a security issue. Sending a normal fax is ok, but if I attach a *.tif file
> it comes up undeliverable with the message
>
> The Microsoft Fax transport failed to deliver the message to the

recipient.
> Not all attachments can be rendered.
>
> Here is my code, I have changed the fax number.
>
>
>
> objSession = CreateObject("Mapi.Session")
> objSession.Logon ()
> MESSAGEBOX("CDO version installed is "+trans(objSession.Version))
> objMessage = objSession.Outbox.Messages.Add
> objMessage.Subject = "Test"
> objMessage.Text = "This is a test with an attachment"
>
> objRecipient = objMessage.Recipients.Add
> objRecipient.Name = "[FAX:5555555555]"
> objRecipient.Type = 1
> objRecipient.Resolve ()
> objAttachment = objMessage.Attachments.Add()
> objAttachment.Position = 0
> objAttachment.Type = 1
> objAttachment.ReadFromFile("C:\B.TIF")
> objAttachment.Source = "C:\B.TIF"
> objAttachment.Name = "B.TIF"
> objMessage.Send ()
> objSession.Logoff
>
> Thank you for any help
>
> David
> Anagram Systems Limited
> work email: (E-Mail Removed)
>



 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      2nd Feb 2004
Thanks, Russ, I just happened by <g>

I see a couple of problems. First of all I'm surprised that the CDO
code isn't triggering the security prompts when a recipient is added
to the message and when the .Send method is used. Outlook 2000 SP2 and
later restrict those things from CDO code. And even in Outlook 2003,
where Outlook VBA code is intrinsically trusted, any CDO code or
Outlook automation code that accesses restricted properties and
methods will trigger the security prompts.

Can you (the original poster) send a fax manually using a TIF
attachment? Usually adding an attachment to a fax and having it work
is a matter of a correctly defined Print verb in the properties of
that attachment type. If you can send it manually it should be
sendable using code. There's no special restrictions on sending TIF
attachments in any Outlook version.

Also, that CDO logon bothers me. If Outlook is running it really
should be a piggy-back logon:
objSession.Logon "", "", False, False
If Outlook isn't running the logon used would need some sort of logon
arguments.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginners Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Russ Valentine [MVP-Outlook]" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> You might want to post in one of the programming groups, too. Not

sure
> you're going to get the programming traffic in here that could help,

unless
> Ken Slovak happens by.
> --
> Russ Valentine
> [MVP-Outlook]
> "David" <(E-Mail Removed)> wrote in message
> news:1u56veiemsc7s$.(E-Mail Removed)...
> > Dear All
> >
> > I am having problems with mapi sending faxes with Outlook 2000

sp3, xp and
> > 2003. Early version are ok. I am getting to a point where I think

it may
> be
> > a security issue. Sending a normal fax is ok, but if I attach a

*.tif file
> > it comes up undeliverable with the message
> >
> > The Microsoft Fax transport failed to deliver the message to the

> recipient.
> > Not all attachments can be rendered.
> >
> > Here is my code, I have changed the fax number.
> >
> >
> >
> > objSession = CreateObject("Mapi.Session")
> > objSession.Logon ()
> > MESSAGEBOX("CDO version installed is "+trans(objSession.Version))
> > objMessage = objSession.Outbox.Messages.Add
> > objMessage.Subject = "Test"
> > objMessage.Text = "This is a test with an attachment"
> >
> > objRecipient = objMessage.Recipients.Add
> > objRecipient.Name = "[FAX:5555555555]"
> > objRecipient.Type = 1
> > objRecipient.Resolve ()
> > objAttachment = objMessage.Attachments.Add()
> > objAttachment.Position = 0
> > objAttachment.Type = 1
> > objAttachment.ReadFromFile("C:\B.TIF")
> > objAttachment.Source = "C:\B.TIF"
> > objAttachment.Name = "B.TIF"
> > objMessage.Send ()
> > objSession.Logoff
> >
> > Thank you for any help
> >
> > David
> > Anagram Systems Limited
> > work email: (E-Mail Removed)
> >

>
>



 
Reply With Quote
 
David
Guest
Posts: n/a
 
      2nd Feb 2004
Dear Ken

Thank you for your reply. I do use proper logon in the application, my code
is just for testing.

I have tried sending a fax manually and it does the same. Is this a problem
with the program associated with the tif?

Kind regards

David
Programmer
Anagram Systems Limited


On Mon, 2 Feb 2004 09:46:55 -0500, Ken Slovak - [MVP - Outlook] wrote:

> Thanks, Russ, I just happened by <g>
>
> I see a couple of problems. First of all I'm surprised that the CDO
> code isn't triggering the security prompts when a recipient is added
> to the message and when the .Send method is used. Outlook 2000 SP2 and
> later restrict those things from CDO code. And even in Outlook 2003,
> where Outlook VBA code is intrinsically trusted, any CDO code or
> Outlook automation code that accesses restricted properties and
> methods will trigger the security prompts.
>
> Can you (the original poster) send a fax manually using a TIF
> attachment? Usually adding an attachment to a fax and having it work
> is a matter of a correctly defined Print verb in the properties of
> that attachment type. If you can send it manually it should be
> sendable using code. There's no special restrictions on sending TIF
> attachments in any Outlook version.
>
> Also, that CDO logon bothers me. If Outlook is running it really
> should be a piggy-back logon:
> objSession.Logon "", "", False, False
> If Outlook isn't running the logon used would need some sort of logon
> arguments.


 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      2nd Feb 2004
Yes, in that case it's a problem not with code but with the Print verb
defined for the TIF extension. Open Windows Explorer and select Tools,
Folder Options. Go to the File Types tab. See what if anything is
registered to handle TIF files and see what the Print and PrintTo
verbs are. You might have to create those verbs, you can model the
settings on the settings for those verbs for other types of files.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginners Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"David" <(E-Mail Removed)> wrote in message
news:fta6jd0qrppe.14rt9ndb9bai3$.(E-Mail Removed)...
> Dear Ken
>
> Thank you for your reply. I do use proper logon in the application,

my code
> is just for testing.
>
> I have tried sending a fax manually and it does the same. Is this a

problem
> with the program associated with the tif?
>
> Kind regards
>
> David
> Programmer
> Anagram Systems Limited



 
Reply With Quote
 
David
Guest
Posts: n/a
 
      3rd Feb 2004
Dear Ken

Thank you for your help. I added a printto verb into the registry for the
tif extension, using the Microsoft Office Document Imaging and the code
works

David
Anagram Systems Limited

On Mon, 2 Feb 2004 11:26:56 -0500, Ken Slovak - [MVP - Outlook] wrote:

> Yes, in that case it's a problem not with code but with the Print verb
> defined for the TIF extension. Open Windows Explorer and select Tools,
> Folder Options. Go to the File Types tab. See what if anything is
> registered to handle TIF files and see what the Print and PrintTo
> verbs are. You might have to create those verbs, you can model the
> settings on the settings for those verbs for other types of files.


 
Reply With Quote
 
David
Guest
Posts: n/a
 
      4th Feb 2004
On Mon, 2 Feb 2004 11:26:56 -0500, Ken Slovak - [MVP - Outlook] wrote:

> Yes, in that case it's a problem not with code but with the Print verb
> defined for the TIF extension. Open Windows Explorer and select Tools,
> Folder Options. Go to the File Types tab. See what if anything is
> registered to handle TIF files and see what the Print and PrintTo
> verbs are. You might have to create those verbs, you can model the
> settings on the settings for those verbs for other types of files.



Dear Ken

I have come across another problem perhaps you could help me with. When I
fax, it sends the attachment to the default printer.

Kind regards

David
Anagram Systems Limited
 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      4th Feb 2004
Take a look at Russ's answer yesterday in the thread "Re: sending .tif
files as fax directly from outlook 2003" and see if that helps. It
sounds like the same or a related problem.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginners Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"David" <(E-Mail Removed)> wrote in message
news:wdv0e0k8tdse$.(E-Mail Removed)...
> On Mon, 2 Feb 2004 11:26:56 -0500, Ken Slovak - [MVP - Outlook]

wrote:
>
> > Yes, in that case it's a problem not with code but with the Print

verb
> > defined for the TIF extension. Open Windows Explorer and select

Tools,
> > Folder Options. Go to the File Types tab. See what if anything is
> > registered to handle TIF files and see what the Print and PrintTo
> > verbs are. You might have to create those verbs, you can model the
> > settings on the settings for those verbs for other types of files.

>
>
> Dear Ken
>
> I have come across another problem perhaps you could help me with.

When I
> fax, it sends the attachment to the default printer.
>
> Kind regards
>
> David
> Anagram Systems Limited



 
Reply With Quote
 
David
Guest
Posts: n/a
 
      4th Feb 2004
On Wed, 4 Feb 2004 10:27:17 -0500, Ken Slovak - [MVP - Outlook] wrote:

> Take a look at Russ's answer yesterday in the thread "Re: sending .tif
> files as fax directly from outlook 2003" and see if that helps. It
> sounds like the same or a related problem.



Dear Ken

Thank you again, that does works.

Kind regards

David
Anagram Systems Limited
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual FoxPro - Outlook 2000 - sending faxes David Microsoft Outlook Fax 1 28th Nov 2005 10:40 PM
Troubles with fax covers on 2003SBS Teleco69 Microsoft Windows 2000 Fax 2 8th Feb 2005 10:19 AM
printer permissions 2000pro/xp pro/2003SBS justin Microsoft Windows 2000 Printing 1 12th Jul 2004 07:12 AM
domain setup with 2003sbs(premium) and 2k pro justin Microsoft Windows 2000 Deployment 0 10th Jul 2004 02:50 AM
Can Send Faxes/Cannot receive faxes James Windows XP Print / Fax 0 20th May 2004 01:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:04 PM.