Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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:

http://qikr.co/wqvk5

PDF file after conversion

http://qikr.co/xa8dn

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");
            job.Start();

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

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.