SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I insert a quick part (document property) in both header and body it displays the look up ID after PDF conversion using Word automation services.

If I only insert in the header or body it works fine. I can't use the same look up in both header and body at the same time.

Word template with same quick part in header and body:

PDF file after conversion

The code:

  string siteUrl = "http://sp2010dev1";

        string wordAutomationServiceName = "Word Automation Services";
        using (SPSite spSite = new SPSite(siteUrl))
            ConversionJob job = new ConversionJob(wordAutomationServiceName);
            job.UserToken = spSite.UserToken;
            job.Settings.UpdateFields = true;
            job.Settings.OutputFormat = SaveFormat.PDF;
            job.AddFile(siteUrl + "/Shared%20Documents/Test.docx",
                siteUrl + "/Shared%20Documents/Test.pdf");

share|improve this question
Your links seem broken. :( – Nicole Jan 3 '14 at 0:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.