Detect Right Click in Inline Image
HiI am one of a team of programmers working on an open source Chemistry AddIn for Word hosted on CodePlex http://chem4word.codeplex.com/.We read chemistry files in cml (see www.xml-cml.org) or mol...
View ArticleAlternative algorithm to REPLACE ALL (wdReplaceAll)?
Bear with me please as I have extremely little VB knowledge or experience. I am trying to update an existing module function that takes two arguments: var and varValue. The function simply does a...
View ArticleExportAsFixedFormat results in odd File is Read-Only error
This appears to be the same question that was on this very old thread (which wasn't resolved there):...
View ArticleI forgot my password of my templates in word
Hello, I created some templates in word where I added styles and shortcuts and I restricted the editing.I created them back in October 2016 and now I am trying to stop the protection and I cannot do it...
View ArticleMail Merge Returning -1?
I have a VB.NET project wherein I am trying to merge an Excel document with Word documents (containing the merge fields). The code works well (in slightly modified forms) for the same process in other...
View ArticlePowershell word.application problem
Dear fellows, I try to open and print document by task scheduller on 2008r2 server (powershell 4). I found some problems with a systemprofile, but not all problems...
View ArticleWORD VBA How to add text after a list
At the end of our a Word2010 document we've a numbered list of 6 items. We would like to add a text, say,End of Document at the end of that document using VBA. But when I try the following code it...
View ArticleWORD VBA to detect if a paragraph is a ListParagraph or not.
For example, using WORD VBA, how can we determine if last paragraph of a document is aListParagraph (a list item) or just a simple plain paragraph: ActiveDocument.Range.Paragraphs.Last
View ArticleHow to read a symbol from Range object
How can I read a symbol that was written using InsertSymbol ? If I use Range.Text, it usually returns '(' for any symbol, which isn't much useful to know what exact symbol is there.
View ArticleVBA strange bahavior
Hi,I'm working on a form to generate a customized document from a template and I'm observing a strange behavior in Word/VBA.The form behavior is non-deterministic, which means e.g. adding a msgbox to...
View ArticleSetting text effect glow not working ?
I'd like to set Glow effect programatically (Font / Text Effects / tab Text Effects / Glow).If I record a macro, change the glow, the recorded macro doesn't have any reference to glow effect. Is it a...
View ArticleMacro with the insertation of page number
I have set simple code which works without any error.How to insert page numbers in the correct way and also close window 'Footer and Header' when it is done.Sub ModifyContent1() ' ' ModifyContent1...
View ArticleI want to place a variable in a Word 2016 document and set it it.
I want to place a variable in a Word 2016 document and set it it. The value of this variable will then decide whether or not I include certain text. Similar to an ifdef statement in C header files.I...
View ArticleHyperlink from within a Word Document to a specific page within a PDF document.
I was hoping that someone would be able to assist me. I would like to create a hyperlink (used as a citation) on my Word document that opens directly to a specified page within a PDF document...
View ArticleVBA for printing each page of document individually in a loop
I am trying to set up a macro with a loop which will cycle through the number of pages in a document and print each respective page individually. With my current code, only page 1 is printed every...
View ArticleContentcontrols.add error 4605, bug??
Hi, I'm using Word 2013 and I'm trying to add content controls to a bunch of table cells. I don't want to use current selection when adding since I've heard that it's preferable to use ranges...
View Articledefault value for conditional text field
I am creating a survey in Word 2013, and have set up IF fields with different text that displays depending on what the user selects from a dropdown content control.The code is constructed as follows:{...
View ArticleFont.Hidden = 1 doesn't work as documented
I have following text in a Word document : "123". I created a style that has Font Hidden checked. I apply the style to '2' in that text. I want to hide this text 123 using add-in so I...
View ArticleWord 2013 Macro to insert a page break after every other text "Date"
Good morning,I am trying to write a macro to insert a page break after every other word it sees called "Date" Each section has 2 texts "Date" and i need the macro to insert after the 1st time it...
View ArticleDelete Table of Contents from Word by Macro
Hi all!I have a Word document that contains Table of Contents (added by "References"->"Table of Contents"). I wrote the following macro that should delete TOC section:Sub...
View Article