![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hello,
I've code right here that create a pdf from any document and merge it to another existing pdf. My only problem is that when I use the function avFormCapture.Open "", "" to create the pdf, the files is opened. Is there way so nothing open or instead just some kind of progress bar ? Thanks The code I use : Option Compare Database Option Explicit Sub Attach2Pdf() Dim objCurrent As AccessObject Dim Acroapp As CAcroApp Dim avCodeFile As CAcroAVDoc Dim avFormCapture As CAcroAVDoc Dim pdCodeFile As CAcroPDDoc Dim pdFormCapture As CAcroPDDoc Dim lngPage As Long 'Start Acrobat in the background Set Acroapp = CreateObject("AcroExch.App") 'Uncomment the following line if you want to watch the program run 'Acroapp.Show Set avCodeFile = CreateObject("AcroExch.AVDoc") 'This is the code file Set avFormCapture = CreateObject("AcroExch.AVDoc") 'This will be each jpg in turn 'Open the fax avCodeFile.Open "C:\Documentation\CodeFile.pdf", "Fax Sent" Set pdCodeFile = avCodeFile.GetPDDoc 'Open the receipt in order to be merged with the fax avFormCapture.Open "C:\Documentation\email.doc", "Fax Receipt" Set pdFormCapture = avFormCapture.GetPDDoc lngPage = pdCodeFile.GetNumPages - 1 'Insert the file at the right page pdCodeFile.InsertPages lngPage, pdFormCapture, 0, 1, 0 pdFormCapture.Close avFormCapture.Close 1 Set pdFormCapture = Nothing 'close the doc file now with form captures pdCodeFile.Close avCodeFile.Close 0 'Exit Acrobat Acroapp.Exit Set objCurrent = Nothing Set Acroapp = Nothing Set avCodeFile = Nothing Set pdCodeFile = Nothing Set avFormCapture = Nothing End Sub |
#2
|
|||
|
|||
![]()
And your Outlook programming question is... ?
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Nader" wrote in message ... Hello, I've code right here that create a pdf from any document and merge it to another existing pdf. My only problem is that when I use the function avFormCapture.Open "", "" to create the pdf, the files is opened. Is there way so nothing open or instead just some kind of progress bar ? Thanks The code I use : Option Compare Database Option Explicit Sub Attach2Pdf() Dim objCurrent As AccessObject Dim Acroapp As CAcroApp Dim avCodeFile As CAcroAVDoc Dim avFormCapture As CAcroAVDoc Dim pdCodeFile As CAcroPDDoc Dim pdFormCapture As CAcroPDDoc Dim lngPage As Long 'Start Acrobat in the background Set Acroapp = CreateObject("AcroExch.App") 'Uncomment the following line if you want to watch the program run 'Acroapp.Show Set avCodeFile = CreateObject("AcroExch.AVDoc") 'This is the code file Set avFormCapture = CreateObject("AcroExch.AVDoc") 'This will be each jpg in turn 'Open the fax avCodeFile.Open "C:\Documentation\CodeFile.pdf", "Fax Sent" Set pdCodeFile = avCodeFile.GetPDDoc 'Open the receipt in order to be merged with the fax avFormCapture.Open "C:\Documentation\email.doc", "Fax Receipt" Set pdFormCapture = avFormCapture.GetPDDoc lngPage = pdCodeFile.GetNumPages - 1 'Insert the file at the right page pdCodeFile.InsertPages lngPage, pdFormCapture, 0, 1, 0 pdFormCapture.Close avFormCapture.Close 1 Set pdFormCapture = Nothing 'close the doc file now with form captures pdCodeFile.Close avCodeFile.Close 0 'Exit Acrobat Acroapp.Exit Set objCurrent = Nothing Set Acroapp = Nothing Set avCodeFile = Nothing Set pdCodeFile = Nothing Set avFormCapture = Nothing End Sub |
#4
|
|||
|
|||
![]()
Not unless you have some addin or other code that would create a PDF file,
Outlook has no native support for PDF and neither does VBA. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Nader" wrote in message ... sorry I wasn't thinking. Is there a way to create a pdf using vba from an outlook message ? thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
vba code that insert a hyperlink file in the body of message | gabriel | Outlook and VBA | 3 | April 24th 06 02:51 PM |
Is it possible to create and publish Outlook Custom Form through VBA | [email protected] | Outlook - General Queries | 3 | March 10th 06 10:25 PM |
Is it possible to create and publish Outlook Custom Form through VBA | [email protected] | Outlook - General Queries | 1 | March 10th 06 03:51 PM |
create meeting request from another mailbox in VBA? | Nick B | Outlook and VBA | 1 | March 7th 06 08:09 PM |
Compress PST-File with VBA | Heinz-Dieter Janzen | Outlook and VBA | 1 | February 28th 06 05:55 PM |