Re: Printing help

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I've been put on another project for a few day. You understand correctly what I wanted to do. I have a third-party com component that will append a pdf to another pdf so I can use that. We had hoped to avoid using it. Still a co-worker insists that Word will do this. When I get back on this project (probably next week) I'll insist he prove it to me.

Jialiang Ge [MSFT] wrote:
Hello CJ,

If the program is required to be designed as new letter + existing pdf = new pdf, we need to turn to some third party libraries or open source components (e.g. Gillard's links) for help because Microsoft does not have component to read&edit an existing pdf file.

But if the program can be designed as new letter + existing doc(x) template = new pdf, we can implement it with VB.NET + Microsoft Word 2007 (note: Microsoft Word 2003 and the previous do not have the function in its object model to export a document to pdf. This feature is new to Word 2007). Here is a step list of implementation for your reference.

Step1. Create a Word document with a bookmark "DearTitle" in the first line, followed by the same text for each customer.

Step2. Regarding your request of a small line along the right side of the page, I think we can place a Word line shape at the right position, and set is Text Wrapping to "In front of text" so that the line has a fixed position and does not interfere with the document body.

Step3. Save the document as a Word template (dotx)

Step4. Create a new VB.NET project in Visual Studio, prepare for Word automation, and write code to create a new document based on the dotx in step3.
http://support.microsoft.com/kb/316383/en-us
oWord.Documents.Add "<Path to your template>\MyTemplate.dot"

Step5. Automate Word to set the bookmark "DearTitle"'s text as customers' name ("Dear Mr. Smith")
http://support.microsoft.com/kb/316383/en-us
oDoc.Bookmarks.Item("DearTitle").Range.Text = "Dear Mr. Smith"

Step6. Export the document to pdf
oDoc.ExportAsFixedFormat("d:\result.pdf", Word.WdExportFormat.wdExportFormatPDF)

CJ, please let me know whether this step list is helpful to you or not. If you have any other questions or concerns, DON'T hesitate to tell me.

Regards,
Jialiang Ge (jialge@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg@xxxxxxxxxxxxxx

==================================================
Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • Re: XP Update causes product faults - DLLCache??
    ... he followed the POPUP and sent it to Microsoft. ... because it was something recommened to the customer with the XP update and I ... >> thousands of dollars in sofrware packing that claim WIN32 compatibility, ... > when the support incidents are opened. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Fax TIF conversion to PDF
    ... I know it's probably not going to help but asterisk offers fax to pdf then ... >> Microsoft is providing this information as a convenience to you. ... >> Microsoft CSS Online Newsgroup Support ... >> This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)
  • Re: OFFICELIVE: How to access email in an Office Live Basic servic
    ... I am a fairly loyal Microsoft customer, but now I understand why some of the ... It took me three email exchanges with Office Live support before ... unsolicited mail sent to my personal account will be deleted without ...
    (microsoft.public.office.misc)
  • Re: WSAENOBUFS on winsock client application
    ... contacting Microsoft Customer Support Services. ... contacting Microsoft Customer Support Services at ... handle's the unexpected connection termination which possibly results ...
    (microsoft.public.win32.programmer.networks)
  • Re: Printing help
    ... With the template letter opened in word I went to the bottom and put a hard return to get me at the top of page 2. ... However the problem I found was when the pdf was inserted into the word document it shows much smaller than it really is. ... Microsoft Word 2003 and the previous do not have the function in its object model to export a document to pdf. ... We welcome your comments and suggestions about how we can improve the support we provide to you. ...
    (microsoft.public.dotnet.languages.vb)