[Solved] How can I implement a word to PDF conversion in python without importing any libraries? [closed]

Code it from scratch. If you’re not going to use an external library, that is by definition pretty much your only option. You’ll want to become an expert in the formal specifications for both PDF and MS Word. Given the complexity and history of each of those, I expect a senior developer will want 6-12 … Read more

[Solved] Word VBA force save as .docm

In order to hijack the native “SaveAs” dialog in Word, you need to lever the Application-level event for DocumentBeforeSave, and then call the FileDialog manually, in order to validate the extension. 1. Create a standard code module and name it modEventHandler. Put the following code in it. Option Explicit Public TrapFlag As Boolean Public cWordObject … Read more

[Solved] Excel VBA to convert all Word files in a specific folder to PDF [closed]

I’ve finally found the correct VBA I was looking for: ‘In your VBA window go to tools then references and add a reference to ‘Microsoft Word Sub Converter() Dim cnt As Integer, currfile As String Dim TrimFile As String, Path As String, FilesInPath As String _ , MyFiles() As String, Fnum As Long Dim CalcMode … Read more

[Solved] Graph portion of Excel table in Word with a macro

go back to the beginning insert a document variable in a new word document using following sequence (word 2016) insert tab … text … quick parts … field … categories: document automation … field names: docVariable … put in variable name xxxx then run this code Sub aaa() ‘ActiveWindow.View.ShowFieldCodes = Not ActiveWindow.View.ShowFieldCodes ‘ toggle field … Read more

[Solved] GetObject(, “Word.Application”) Office 365

SOLVED ! Search in the registry for correct application name. On windows 7 you can find it in “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\RegisteredApplicati‌​ons”. Then replace the new name in “Set wrd = GetObject(, “Word.Application”) Thanks to @pavanc It was called Word.Application.16 instead of Word.Application solved GetObject(, “Word.Application”) Office 365

[Solved] Word 2016- How to add/delete Repeating Section Content Control in VBA

To delete repeating item section for specifically named RSCC just edit the code you found in the other question. Set cc = ActiveDocument.SelectContentControlsByTitle(“RepCC”).Item(1) ‘to delete the first RepeatingSectionItem cc.RepeatingSectionItems.Item(1).Delete ‘to delete all but the first RepeatingSectionItem Dim index As Long For index = cc.RepeatingSectionItems.Count To 2 Step -1 cc.RepeatingSectionItems.Item(index).Delete Next index ‘to delete the entire … Read more

[Solved] How to read doc file using Poi?

You are trying to open a .docx file (XWPF) with code for .doc (HWPF) files. You can use XWPFWordExtractor for .docx files. There is an ExtractorFactory which you can use to let POI decide which of these applies and uses the correct class to open the file, however you can then not iterate by page … Read more

[Solved] Hello I want to insert zero before the decimal value but its getting skipped and getting into the loop following procedure was created find the error [closed]

It seems to me all you need is a wildcard Find/Replace where: Find = ([!0-9])(.[0-9]) Replace = \10\2 You don’t even need a macro… 0 solved Hello I want to insert zero before the decimal value but its getting skipped and getting into the loop following procedure was created find the error [closed]

[Solved] How to get specific words from Word document(*.doc) using C#? [closed]

A simple approach is using string.Split without argument(splits by white-space characters): using (StreamReader sr = new StreamReader(path)) { while (sr.Peek() >= 0) { string line = sr.ReadLine(); string[] words = line.Split(); foreach(string word in words) { foreach(Char c in word) { // … } } } } Let me know, if you have any questions. … Read more