Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Send a fax from VBA

Hi!

I've got a worksheet containing an invoice with client information including
fax number.
I would like this invoice to be faxed when the user clicks on a button.
This works fine with the 'Printout' method of the Workbook (I can select the
fax as printer and the assistant shows up, which I'm ok with).
However, I would like the fax number to be automatically set in the
assistant window, so that the user doesnt have to type it in manually.
Is there a way to do this without buying a third party component?

I'm using Excel 2000.

Thanks in advance!
Jérémie


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Send a fax from VBA

Hi Jérémie ,

Typically, you would use the AppActivate statement to activate the fax
assistant program. (This would not be needed if the assistant is already
active.)
Then you would use the Sendkeys statement to TAB to the required textbox and
fill in the fax number. Use Sendkeys again to press the Enter key.

Sendkeys is not without it's problems. Most proffesional programmers won't
use it as it can be fouled up if the user presses keys while it is running.
More robust techniques involve using a number of Win32 API functions.


Regards,
Vic Eldridge



"Jérémie Gent" wrote:

Hi!

I've got a worksheet containing an invoice with client information including
fax number.
I would like this invoice to be faxed when the user clicks on a button.
This works fine with the 'Printout' method of the Workbook (I can select the
fax as printer and the assistant shows up, which I'm ok with).
However, I would like the fax number to be automatically set in the
assistant window, so that the user doesnt have to type it in manually.
Is there a way to do this without buying a third party component?

I'm using Excel 2000.

Thanks in advance!
Jérémie



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Send a fax from VBA

OK Thank you Vic
I also think this solution is maybe a bit dangerous, but I may use it
though, I don't know.
So thank you anyway for the idea.
By now, I'm looking deeper into another solution using the
Faxcomlib.Faxserver object (which I didn't know) and which works fine on
Windows XP / Excel 2K (no need to buy / install anything else)

br
Jérémie

"Vic Eldridge" schrieb im
Newsbeitrag ...
Hi Jérémie ,

Typically, you would use the AppActivate statement to activate the fax
assistant program. (This would not be needed if the assistant is already
active.)
Then you would use the Sendkeys statement to TAB to the required textbox
and
fill in the fax number. Use Sendkeys again to press the Enter key.

Sendkeys is not without it's problems. Most proffesional programmers won't
use it as it can be fouled up if the user presses keys while it is
running.
More robust techniques involve using a number of Win32 API functions.


Regards,
Vic Eldridge



"Jérémie Gent" wrote:

Hi!

I've got a worksheet containing an invoice with client information
including
fax number.
I would like this invoice to be faxed when the user clicks on a button.
This works fine with the 'Printout' method of the Workbook (I can select
the
fax as printer and the assistant shows up, which I'm ok with).
However, I would like the fax number to be automatically set in the
assistant window, so that the user doesnt have to type it in manually.
Is there a way to do this without buying a third party component?

I'm using Excel 2000.

Thanks in advance!
Jérémie





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Send a fax from VBA

Well Vic, after a lot of time involved in searching for other solutions, I
finally took yours.
So thank you again for this Tip, the other solutions were unfortunately
unsuccessfull!

Here is my function:

Public Sub FaxeFeuille(FeuilleAFaxer As String, destinataire As String,
numero As String)
Dim keys As String
Worksheets(FeuilleAFaxer).Select
keys = "^p%nfax~~~" & destinataire & "{TAB}{TAB}" & numero
SendKeys keys
End Sub

You must have a fax printer called 'Fax'.
Works on Excel 2K / Windows Xp german.

BR
Jérémie


"Vic Eldridge" schrieb im
Newsbeitrag ...
Hi Jérémie ,

Typically, you would use the AppActivate statement to activate the fax
assistant program. (This would not be needed if the assistant is already
active.)
Then you would use the Sendkeys statement to TAB to the required textbox
and
fill in the fax number. Use Sendkeys again to press the Enter key.

Sendkeys is not without it's problems. Most proffesional programmers won't
use it as it can be fouled up if the user presses keys while it is
running.
More robust techniques involve using a number of Win32 API functions.


Regards,
Vic Eldridge



"Jérémie Gent" wrote:

Hi!

I've got a worksheet containing an invoice with client information
including
fax number.
I would like this invoice to be faxed when the user clicks on a button.
This works fine with the 'Printout' method of the Workbook (I can select
the
fax as printer and the assistant shows up, which I'm ok with).
However, I would like the fax number to be automatically set in the
assistant window, so that the user doesnt have to type it in manually.
Is there a way to do this without buying a third party component?

I'm using Excel 2000.

Thanks in advance!
Jérémie





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 giving annoying "Send/Don't Send" error when closing BigDaddyCool Excel Discussion (Misc queries) 0 January 29th 10 02:31 AM
Net Send to many Tazflerts Excel Discussion (Misc queries) 1 November 22nd 09 04:21 AM
Bypass: A program is trying to send mail using Item.Send prompt Vick Excel Discussion (Misc queries) 1 June 25th 09 03:31 AM
My send to in excel/word does not offer send as attachment Mstink Excel Discussion (Misc queries) 11 March 16th 06 02:49 PM
Net send Jim McLeod Excel Programming 1 May 24th 04 04:36 PM


All times are GMT +1. The time now is 05:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"