Home » Sharepoint

Converting Word Documents to PDF Using SharePoint Server 2007

Can i do the same thing in MOSS 2007 If so what else should I keep in mind before going for it http://msdn.microsoft.com/en-us/library/ff181518.aspx

3 Answers Found


Answer 2

Have a look at the PDF Converter for SharePoint. It allows PDF documents  to be created for most popular formats including Word and InfoPath.


Conversions can be controlled via automated workflows or from your own code using Web Service calls.




Answer 3

Hi Shrawan,

yes you can conveet doc fil to pdf  file in moss2007 by using MossDocumentConverter a third party tool need to be installed :

find here :http://docconverter.codeplex.com/


Hi All,
I am working on .Net project where we are storing word, excel, pdf documents in SQL Server as varbinary. One of the user requirement is to search word in document and if found then it should display document in browser with highlighting matching words.
We already have Google Search Appliance which does nice job of returning matching results. We have two problems,
1) Google Search Appliance does not show document in browser as its stored in database and even if it will show then because document is in word or excel format, will ask users to download it instead of directly opening it.
2) As I cannot show users document in browser, there is no way to highlight matching words in document.
One of the suggestion was to convert this varbinary into html and then show in browser window as once it’s converted in html I can play with html and highlight matching words. I am not sure how to convert word, excel, pdf documents into html without using third party tools and if I have to use third party tool then which tool is best.
I would really appreciate any help on this.
Tapan Desai
Do somone have a step-by-stepsolution to this problem;   I have a liberary in SharePoint with version controll. In this liberary I have both Word and Excel documents.  Displaying the metadata from created columns are no problem, but  displaying the Version of the document generated by SharePoint is worse.  I do appreciate if someone can help me with this problem.

We will be implementing Document Search (DOC, DOCX, PDF, TIFF, PPT, PPTX, XLS, XLSX) for one of our customers. We were evaluating a few MOSS 2007 based solutions, and happened to visit your site.  What we intend to achieve are the following functionalities:


a.       User should be able to search through 1000s of documents which are in a Sharepoint Document Library

b.      The documents could be in English, International Languages.

c.       Each document is 70-100 pages, and therefore it is important that the Search Results show the relevant pages on which the Search Text appears (Get Highlighted) within each document . Clicking on the link will take the user to the right page.

d.      The additional requirement is Synonym search. So, I can search for VAT , V.A.T or Value Added Tax and get the same results:

a.       Search Results Page should display the same no. of documents

b.      The Text which has been searched should be all 3 keywords since they are all synonyms and mean the same. This will ensure that the relevancy of search improves - it doesn’t only highlight the Text (within the document) which is searched for, but highlights all the 3 keywords automatically      


Vinay Kumar Singh

PDF to Word Converteris professional and accurate PDF to Word Converter software. It can help you convert PDF file to Word format or RTF format for you to reuse and edit. This PDF Converter preserves the original text, images, graphics, layout and formatting in the output word document. This PDF tool is the free-running software which does not need other assistant programs.

This PDF to Word Converter supports Microsoft Office 2010, 2007, 2003. Supporting batch conversion allows you to convert all your added files at once. While you convert, you can choose the specific page(s) or all pages. This PDF to Word Converter also supports multi-languages: English, Turkish, Thai, Latin, Korean, Greek, Cyrillic, Arabic, Japanese, and Chinese.

Key Functions

Convert PDF files into Microsoft Word documents - With this PDF to Word Converter, you can convert PDF file to Word or RTF format, compatible with Microsoft Office 2010, 2007, 2003.

Choose the exact page that you need to convert - You can set to convert all pages, current page and your self-selected page(s).

Support almost all languages - Any languages of PDF files are supported including English, Turkish, Thai, Latin, Korean, Greek, Cyrillic, Arabic, Japanese, Chinese, etc.

Key Features

Free-running program - While using this PDF Converter, you do not need to install other program like MS Word, Adobe Acrobat and Reader.

Keep the original format - Accurately preserve text, pictures, and layout of the original PDF.

Easy to use - Possessed of the friendly user-interface and advanced technology, you can finish the conversion from PDF file to word document easily.

Free Download: http://www.pdf.file-converter.net/download.php?item=18294-186



I am currently using Windows XP Pro SP3 and Office 2007, Adobe 8 Standard version 8.2.2 and Adobe Distiller8.2.2.217.  Sometimes when I try to convert Word or Excel 2007 documents to adobe PDF, it creates just a blank pdf file.  After a PC reboot, I was able to convert documents to pdf and again  it starts creating blank file.  From Word, if I click 'Acrobat' menu and click 'Create PDF' and in the  'Save As' dialog box when "Quick and Simple" is selected instead of 'Fully functional", pdf documents are created (not blank ones).  Unfortunately,  "Quick and Simple" option is not even available in Excel....So, atleast twice a day I need to restart PC to convert documents....

Any suggestions / comments greately appreciate.

Thanks in advance.



I have an add-in for Word 2007 that embeds documents inside content controls.
It works fine for text files, images and Word documents. But I'm having problems with PDF files.

I have the following code:

1 object classType = "AcroRd32.Document";   
2 object fileNameObject; // contains full path of PDF file 
4 contentControlRange.InlineShapes.AddOLEObject(   
5ref classType, ref fileNameObject, ref missing, ref missing,    
6ref missing, ref missing, ref missing, ref missing);  

This code works ok for the embedding of the first PDF file.
But for the succeeding ones, I get the following error:

"The program used to create this object is AcroRd32. That program is not installed in your computer.
To edit this object, you must install a program that can open the object.

Weird error since the first PDF file was embedded successfully.
I do have Adobe Reader installed on my machine so that shouldn't be a problem.

Any ideas? Or workarounds perhaps? I read somewhere that I can use OpenXml methods but I'm not very familiar with OpenXml.


In my current project, i am using a template (block.dot - word 97 - 2003 format) which contains the basic template along with the styles (heading.. x y z..)

The scenario is, I am opening this block.dot using the below code

Object template = (Object)(Application.StartupPath + "\\Templates\\block.dot");
Word.Document adoc = wordApp.Documents.Add(ref template, ref missing, ref missing, ref missing);

A new Word window opens up with the template document beautifully! I added images.. tables..  etc., and Onclose, i have a function which does document.WordOpenXML.toString() which gives me an XML output with the binary data of the image. I store it inside another main XML which will be used later to generate this document again.

Now, when i try to reconstruct a document from the WordOpenXML (Above), the binary data does not get displayed...

Word.Range rng = adoc.Range(ref start, ref end);
rng.InsertXML(userData.description, ref missing);

All the data tables, sentences, formatting everything was rendered as it is except for the binary data. I get a 'X' mark in place of the inserted image.


If i try the above scenario without any word 97-2003 template (block.dot) i.e.,(ref missing in the template field), i could get the image rendered back perfectly.

Is there anything i can do ? is this a bug ? how can i tackle this situation 


Thanks in advance.



The following bit of code is used to populated data from a Word document to Excel - it worked fine under Office 2003 where it was developed.  It first looked to work fine in Office 2007, however it only works with the original documents created in Word 2003.  It does not work when the source file is created in Word 2007 (created using a .dot template and saving in .doc format) - it throws an error an the document open line "Set wdDoc = wdApp.Documents.Open(filename:=pname & fname)"

Any ideas as to what might be going wrong here? Could it be the use of the Word 2003 .doc template in Word 2007?

Sub GetInvoiceDetail()
  If ActiveSheet.Name <> "Receipts (Jobs)" Then
    MsgBox "This function cam only be used in the Receipts (Jobs) sheet", vbOKOnly, "Error"
    Exit Sub
  End If
  Dim wdApp As Object
  Dim wdDoc As Object
  Dim pname, fname
  Dim t1, t3, t4, t5, t8
  Dim choice
  pname = ActiveWorkbook.Sheets("Tables").Range("K5").Value
  fname = "I-" & ActiveCell
  Set wdApp = CreateObject("Word.application")
  On Error GoTo Err_Handler
  Set wdDoc = wdApp.Documents.Open(filename:=pname & fname)
  On Error GoTo 0
  t1 = wdDoc.formfields("Text1").result
  t3 = wdDoc.formfields("Text3").result
  t4 = wdDoc.formfields("Text4").result
  t5 = wdDoc.formfields("Text5").result
  t8 = wdDoc.formfields("Text8").result
  choice = MsgBox("Invoice Number: " & ActiveCell & vbCr & _
        "Dated: " & t1 & vbCr & _
        "For: " & t8 & vbCr & vbCr & _
        "To:" & vbCr & t3 & vbCr & vbCr & _
        "Location:" & vbCr & t4 & vbCr & vbCr & _
        "Description:" & vbCr & t5 & _
        vbCr & vbCr & "DO YOU WANT TO COPY INVOICE DATA ?", _
        vbYesNoCancel, "Get Invoice Data")
  If choice = vbYes Then
    ActiveCell.Offset(0, 1).Value = CDbl(t8)
    ActiveCell.Offset(0, 3).Value = CDate(t1)
  End If
  wdDoc.Close savechanges:=False
  Set wdDoc = Nothing
  Set wdApp = Nothing
Exit Sub
  MsgBox ("Invoice file not found - have you created this invoice yet?")
  Set wdApp = Nothing
End Sub


I have multiple word files that I'd like to pull into 1 mast word file.  All the files reside in SharePoint.  I've used the Master / Subdocument feature in previous versions of Word but do not see that here.  So I'm trying to do it with inserting linked text or inserting a file linked to the original.

Why am I trying to do this?  This project could wind up with a huge amount of documentation.  In the past when I've created big word files, they become corrupt.  By making smaller files then using the Master / Sub document feature in the past, I've been able to create large documents while avoiding them becoming corrupt.

In addition creating smaller files allows editing / revisions without having to go through a large document to get to what needs to be edited.


I tried linking other word files by inserting as an object, but only the 1st page of that file appears.

I tried inserting text and linking back to the original file, and absolutley nothing happens.


And finally, when I insert text from another file, it changes the font and messes up the margins and tables.  All my files are Ariel font, yet the inserted text become Verdun.

Any advice?

I have created a Word add-in which would load data in custom ribbon from external web service. I need to have that add-in in a document so that It can populate the data only on that document. I don't want to have application level add-in because It will try to load data for any other word document user might create. I want to do this as this document would serve as a template for other documents. Is this possible? 

If the above is not possible, how do you actually install the word-2007 add-in.  I see this link. Is this the way one should do it? 


I have one staging sharepoint 2007 site and production sharepoint 2007 site. Users updating at the staging environment and we are using content deployment to change the content in the production site.We are mainly uploading and updating  PDF documents. Content deployment is scheduled every 15 minutes. PDF are uploading but not updating, the production is still displaying the older version of the pdf files.

We have set up no check out for the document edit at the production environment. We cant overwrite any pdf file in this production environment.


Any help really appreciated.





Today one of our users come to me and told me, that he have a PDF document with some signatures and the funy think is that once he upload this document to SharePoint document library, then those signatures disappear (I've open this PDF thru the browser directly and also downloaded it to the disk and opened from the disk <- and he is right! Upload of PDF document to SharePoint for some reason remove those signatures! :().

In addition to above I've also made one additional excecise : before I've uploaded PDF document to sharepoint, I've changed his extension. Once I've done that and tried to open document by downloading it to the disk then document was fine! Signatures were presisted.

So, this for sure has to do something with PDF document and SharePoint.

Does anyone encounter similar problem ? I thought that there is no further processing of uploded documents.

thanks in advance


We have an issue where we can edit a pdf document in SharePoint 2007 by clicking 'Edit Document'.  This checks out the PDF document to the SharePoint Drafts folder.

We can edit the PDF from within this drafts folder then save it back to this folder.  However, when we go back to SharePoint and try to check it back in, we get an error.

Please note that we have to follow the above process because we log into one server (GIS) but the publishing site is out on another server within our DMZ.

This is actually the second issue we have had with SharePoint 2007 and Adobe Acrobat 8.  This first issue was when we clicked "Edit Document" from within SharePoint, the whole system would crash.  We changed the default drafts folder and have to follow the above process (e.g. check out, go to drafts folder and edit PDF, then save.  Go back to sharepoint and check it back in).

What I'm wanting to know is whether anybody else has had the same issue where you could not check the PDF document back into SharePoint?

If so, did you find a work around?


We have an issue where we can edit a pdf document in SharePoint 2007 by clicking 'Edit Document'.  This checks out the PDF document to the SharePoint Drafts folder.

We can edit the PDF from within this drafts folder then save it back to this folder.  However, when we go back to SharePoint and try to check it back in, we get an error.

Please note that we have to follow the above process because we log into one server (GIS) but the publishing site is out on another server within our DMZ.

This is actually the second issue we have had with SharePoint 2007 and Adobe Acrobat 8.  This first issue was when we clicked "Edit Document" from within SharePoint, the whole system would crash.  We changed the default drafts folder and have to follow the above process (e.g. check out, go to drafts folder and edit PDF, then save.  Go back to sharepoint and check it back in).

What I'm wanting to know is whether anybody else has had the same issue where you could not check the PDF document back into SharePoint?

If so, did you find a work around?

Unable to apply publishing feature on a PDF file uploaded in a SharePoint 2007 document library


We want to convert word document to PDF using Word Automation in VC++. Following is a code snippet :


CLSID clsid;
IDispatch *pWApp;
HRESULT hr = CLSIDFromProgID(L"Word.Application", &clsid);
hr = CoCreateInstance(clsid, NULL, CLSCTX_LOCAL_SERVER, IID_IDispatch, (void **)&pWApp);
hr = OLEMethod(DISPATCH_PROPERTYPUT, NULL, pWApp, L"Visible", 1, COleVariant((long)1));
VARIANT result;
hr = OLEMethod(DISPATCH_PROPERTYGET, &result, pWApp, L"Documents", 0);
IDispatch *pDocs = result.pdispVal;
VARIANT result2;
hr = OLEMethod(DISPATCH_METHOD, &result2, pDocs, L"Open", 1, COleVariant(L"D:\\MyDoc.doc"));
//Convert to PDF
COleVariant varName(L"D:\\TestMyDoc1.doc");
COleVariant varFormat((short)17);
COleVariant vtOptional((long) DISP_E_PARAMNOTFOUND, VT_ERROR);
IDispatch *pDoc = result2.pdispVal;
VARIANT result3;
hr = OLEMethod(DISPATCH_METHOD, &result3, pDoc, L"SaveAs", 16, varName.Detach(),varFormat.Detach());
IDispatch *pDoc1 = result2.pdispVal;
VARIANT result4;
hr=OLEMethod(DISPATCH_METHOD, &result4, pDoc1,L"Close", 0);
OLEMethod code
HRESULT CTestWordAutomationDlg: LEMethod(int nType, VARIANT *pvResult, 
IDispatch *pDisp,LPOLESTR ptName, int cArgs...)
if(!pDisp) return E_FAIL;
va_list marker;
va_start(marker, cArgs);
DISPPARAMS dp = { NULL, NULL, 0, 0 };
char szName[200];
// Convert down to ANSI
WideCharToMultiByte(CP_ACP, 0, ptName, -1, szName, 256, NULL, NULL);
// Get DISPID for name passed...
HRESULT hr= pDisp->GetIDsOfNames(IID_NULL, &ptName, 1, 
if(FAILED(hr)) {
return hr;

// Allocate memory for arguments...
VARIANT *pArgs = new VARIANT[cArgs+1];
// Extract arguments...
for(int i=0; i<cArgs; i++) {pArgs[i] = va_arg(marker, VARIANT);

dp.cArgs = cArgs;
dp.rgvarg = pArgs;
// Handle special-case for property-puts!
dp.cNamedArgs = 1;
dp.rgdispidNamedArgs = &dispidNamed;

unsigned int uArgErr; 
// Make the call!
hr = pDisp->Invoke(dispID, IID_NULL, LOCALE_SYSTEM_DEFAULT, 
nType, &dp, pvResult, &ExcepInfo, &uArgErr);
if(FAILED(hr)) {
return hr;

// End variable-argument section...
delete [] pArgs;
return hr;

In the above code the SaveAs Method returns a type_mismatch error.

hr = OLEMethod(DISPATCH_METHOD, &result3, pDoc, L"SaveAs", 16, varName.Detach(),varFormat.Detach());
IDispatch *pDoc1 = result2.pdispVal;

Can anybody help us by giving the working word automation code in VC++ 2010 for Office 2007 for saving word file to pdf file.

Hi, I've been using SynchToy 2.1 for about a month now and so far love it. One question that I do have is: How does SynchToy reconcile SharePoint folders with version control features activated with folders on my local harddrive (Windows 7 Ultimate) where there is no version control to activate? So far, I haven't had any particular problems doing so, but I'm wondering whether I might be corrupting the Word documents in synchronizing them so.

I'm looking for any suggestions because this one is baffling me.

The deskop computer is running Windows XP SP3, the browser is Internet Explorer 7, Microsoft Office 2007 is installed.

I have a document library that contains Word documents.

I have no problems opening the documents from the document library web part. However, I need to provide access to them via a Dataview web part. I used SharePoint Designer to mark the file name as a hyperlink field (using @FileRef as the URL).

If I click on the link in the dataview web part and then choose Open from the Open/Save/Cancel dialog box, the browser hangs and Microsoft Word is not openend.

I can click on the Save option and download the file without any issue.

Using Fiddler, it looks like the document has been downloaded to the client.

We are experiencing the same issue when trying to open the same documents via a SQL Reporting Services report. This used to work before.

Any ideas? This is happening from 3 different machines that I have tested on. However, I cannot recreate the issue on my VM environment (using Win 7, IE 8 and Office 2007)



We are current having word documents on Sharepoint 2007 and they are accessed through sharepoint shortcuts(.aspx) embedded as hyperlinks in a word document. With Office 2003 (XP, IE 7), we are able to open the sharepoint document when we click on the .aspx hyperlink. But the same hyperlink fails to open in Office 2007 / 2010.

In Office 2010, a blank document opens. When we navigate to the file location, the sharepoint shortcut page opens : it fails to redirect it further to the document. However, before opening the document, it gives the MS Office warning message - 'Opening https:\\sharepoint.......doc. Some files contain virus or be harmful to.... Would you like to open this file?'

Is there any specific setting that was missed out? Would appreciate any input on the above issue.



Since we had the migration from Office 2003 to Office 2007 we are unable to open a document and then type on it and print.  We have to save the document first then open this saved version and type in the details. 

When we were running Office 2003 it would open and we could edit the form and print it.  But with 2007 you need to check it out. 

These Word documents are just forms we want guests to fill out and print on the fly.

Any help would be great.



<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure