Here are some improvements on SP2 that matter to developers:
Update: Also, here's a great sample VBA sample code from Ron de Bruin: http://www.rondebruin.nl/pdf.htm
Before SP2, you could download a free add-in to get this functionality. The SP2 offers this functionality out-of-the box.
Gray Knowlton has a couple great posts that explain more details of this release:
PingBack from http://asp-net-hosting.simplynetdev.com/office-2007-service-pack-2-download-and-improvements-for-developers/
Hi Erika
I have VBA page with code to save and mail as PDF for Excel on my site.
http://www.rondebruin.nl/pdf.htm
Hi Erika,
Is there a simple way to check whether the "Save As PDF" option is available.
At the moment I check to see if the addin is installed, but I guess now I'm also going to need to check the word version.
Is that the correct way to do it or is there a better way?
Thanks
LJ
Here is the code part
If Dir(Environ("commonprogramfiles") & "\Microsoft Shared\OFFICE" _
& Format(Val(Application.Version), "00") & "\EXP_PDF.DLL") <> "" Then
Ron,
Thanks for that. I do already have working code that does the trick, but in a much more convoluted way than your suggestion (I currently assume it's installed if the word version is greater than or equal to the 2007 SP2 version and check the uninstall list from the registry for the "PDF" or "PDF & XPS" addins).
Your way or mine still seems a bit of a hack to me - it would be nice if there was some easy way to tell in the word object model or failing that what Microsoft's recommended method would be.
Hi John
I think my code line is easy and I not think MS will add this to the object model.
But maybe I am wrong (not the first time <g>)
I create my test line in the 2007 beta and the MS people not have a better suggestion on that moment to test it.
Ron! Thanks for the pointer to your sample. I updated my blog entry and posted a link.
John, Ron's solution should work. You can also experiment with the following vbs script:
Set oWI = CreateObject("WindowsInstaller.Installer")
For Each prod In oWI.Products
If UCase(Right(prod, 7)) = "0FF1CE}" Then _
sOutput = sOutput & prod & vbTab & _
oWI.ProductInfo(prod, "VersionString") & vbTab & _
oWI.ProductInfo(prod, "ProductName") & vbCrLf
Next
wscript.echo sOutput
This scripts helps you determine the version of an installed 2007 Office language pack.
This is the info you should get if you have the Microsoft Save as PDF or XPS Add-in for 2007 Microsoft Office programs installed:
{90120000-00B2-0409-0000-0000000FF1CE} 12.0.4518.1014 Microsoft Save as PDF or
XPS Add-in for 2007 Microsoft Office programs
More info here:
http://support.microsoft.com/kb/945598