FAQ Database Discussion Community


Empty value in Excel cell?

java,excel,ms-office
I have a java program which receives .xlsx (Excel file) as an input. Somehow I manage to create some, lets say, "strange empty state" in one of the cells crucial for work of my program. By that, I mean that cell looks perfectly empty and cause program to has behavior...

Encoding issue when creating MS Word file using VBScript

vbscript,ms-word,ms-office
I'm trying to write a script in VBScript which should open Microsoft Word and write down some text. The script works as expected as long as the text I'm writing is in English. However, when the text is in Hebrew or in Chinese I only get Gibberish in MS Word....

Why can't Excel update some of the links in my workbook

excel,ms-office
I have a Master workbook in MS Excel that references data in 4 other workbooks. When it opens I get the following message: We can't update some of the links in your workbook right now. You can continue without updating their values, or edit the links you think are wrong....

Word - Is it possible to change easily all links' source in a document?

vba,excel-vba,ms-word,ms-office,word-vba
I have 5 Word template linked to an Excel file to automatically generate new pre-formated reports. As I am working on improving it, I have created copies that will replace the old version once I'm done. And in each template, I have approximately 70 links, so almost 350 links in...

Macro in Word to Underline each paragraph in document less than X characters long

vba,ms-word,ms-office,word-vba
I have a word doc of several pages. There are many lines in the document that are short headings, then the carriage return, then a descriptive paragraph. Not front page news. eg Condition Subsequent A condition subsequent is often used in a legal context as a marker bringing an end...

Use Microsoft Office 2013 interop dll in sharepoint 2010

sharepoint,sharepoint-2010,ms-office,office-interop,excel-interop
Is it possible to use interop dll from Office 2013 in Sharepoint 2010 solutions? I need to use excel in my Sharepoint solution, but on server was installed Office 2013 and i cant chose Microsoft.Office.Interop.Excel. Thanks a lot...

Combination of multiple spreadsheets with values at various times

excel,timestamp,ms-office,timestamping
I have multiple spreadsheets with entries as follows: Time Value 2014-01-01 00:00:00 25 2014-01-01 00:10:00 27 2014-01-01 00:20:00 35 2014-01-01 01:30:00 15 And the second: Time Value 2014-01-01 00:00:00 12 2014-01-01 00:40:00 9 2014-01-01 02:30:00 32 As can be seen, both spreadsheets have timestamped values, but they only have entries...

Microsoft.Office.Interop.Word Listen on the Saved Property

c#,ms-office,word-interop
I've been searching for a solution to get noticed when a Document turned Dirty (Unsaved) I know that there is a property Saved on a word document but my problem is that I need to get notice when that Boolean turn to false. I've been searching for an event with...

Package a Ribbon with a Custom VBA Add In for Microsoft Office

excel,excel-vba,ms-office,office-2010
I am working with Excel 2010 but I assume the idea is constant accross all of Office 2010. I am making an Add in to have some VBA Macros that will work with all of my files and would like to make a ribbon that has buttons bound to these...

Determine the file format(version) for old Microsoft office files

.net,file,ms-office,office-interop
I have 50k+ .doc files on one of our servers that users have accumulated since the early 90's. Some of these files were created on Macintosh, or on really old version of Word. I've tried to look at the metadata in Word with no luck. I've tried to use the...

Word VBA: Accessing clicked ActiveX Checkbox

vba,checkbox,ms-office
I have multiple ActiveX checkboxes in my document in a table. They're all calling the same function. With Selection.Cells(1).RowIndex and Selection.Cells(1).ColumnIndex I can find out the table cell of the checkbox. Is it possible that I can get the value of the clicked checkbox aswell? I could only find this...

Is it possible to develop VSTO addins for Office 2007/2010 with Visual Studio 2013?

ms-office,vsto,add-in
Is it possible to develop VSTO addins for Office 2007/2010 with Visual Studio 2013 ? Seeing only VSTO addins targeting Office 2013 by default in Visual Studio 2013.

Outlook 2010 - how to receive attachment events when mail item is created from Word or Excel

ms-office,vsto,outlook-addin
I have an Outlook 2010 plugin using VSTO that converts attachments before they are added to mail items. The way I accomplish this is to register for new inspector events in the plugin startup inspectors = Application.Inspectors; inspectors.NewInspector += new Microsoft.Office.Interop.Outlook.InspectorsEvents_NewInspectorEventHandler(OnNewInspector); then in the new inspector event handler, check for...

Excel - Column chart labels as percentages of the highest bar

excel,charts,ms-office
I'd like to add a label to my Graph. However I want the highest value to be set as 100%, and all other values to be a percentage of that value. For example: FirstSeries 1000 SecondSeries 500 ThirdSeries 100 Is there a way to add labels to columns, so the...

Convert a office document on the client side

javascript,pdf,ms-office
I have a project that I will be researching and hopefully implementing soon. One of the biggest hurdles, that I don't know can be overcome is that document conversion needs to be done through the browser on the client-side. The app must be able to take popular office document types...

OpenXml.WordProcessing.Justification always comes as OpenXmlUnknownElement

.net,ms-office,openxml,openxml-sdk
I'm building a table using OpenXml and setting the Justification property for every cell. It doesn't really matter where I assign this property, either in the Run element or as a TableCellProperty, when the document is open using the Productivity Tool for MS Office the Justification element always comes as...

Excel extract from brackets

excel,vba,excel-vba,excel-formula,ms-office
The code from Get the value between the brackets works well if the cell contains just one "(text)". Unfortunately, in my rows there are many "Sample (sample1) (sample2)" format sentences and I need the last part. Function GetParen(strIn As String) As String Dim objRegex As Object Dim objRegMC As Object...

Macro to iterate through a field filter one at a time using VBA Microsoft project 2010

vba,ms-office,microsoft-project-vba
Basically as the title suggest, I'm trying to iterate through a custom field, named "Text3" which is associated with "Task Owner", drop down filter one resource at a time. I am new at this so please bear with me. Here is my code: Sub Macro1() ' Macro Macro1 ' Macro...

Pre-populate palette colors in Microsoft Office?

excel,vba,ms-office,powerpoint,office-interop
My coworkers have very specific colors they use in their Excel and PowerPoint documents, and they came to me hoping for some automation. They often have to go through the annoying task for every new document of re-picking the same three colors off the color selector. They have to select...

Problems retrieving content controls with Open XML sdk

ms-office,sharepoint-2013,openxml,openxml-sdk
I am developing a solution that will generate word-documents. The word-documents are generated on the basis of a template document which has defined content controls. Everything was working good for me when I had only one content control in my template, but after expanding the template document with more content...

Installer for Microsoft Office Add In

c#,ms-office,clickonce,nsis,office365
I am working on a Microsoft Office Add In. The current installer uses NSIS, but does not provide automatic updates. I would like to provide either optional or mandatory updates in the most user friendly manner possible. It must work for all versions of Office. What is the standard/ best...

How to check if a COM object still exists

.net,com,ms-office,vsto
I basically understand how managed RCW objects wrap COM objects in .NET. My question is what happens when the COM object ceases to exist. I know that the RCW object increases the reference count so the COM object should not be released as long as the RCW object is alive....

Publishing Outlook/Excel add to the office store

ms-office,outlook-addin,publishing,excel-addins,office-addins
I have developed an outlook add-in and an excel add-in and created there respective installers. Now I want to publish these installers to the Microsoft office store(https://store.office.com/). Can anyone provide me the steps to do that?...

This Operation has been canceled due to restrictions in effect on this computer, Please contact your administrator

excel,windows-7,ms-office
I am getting the error message "This Operation has been canceled due to restrictions in effect on this computer, Please contact your administrator" in Excel 2010 (win 7) when try to open a hyperlink to a pdf file located on a shared network drive. The file path on the hyperlink...

Is there any unique ID associated with each Powerpoint presentation file (.ppt or .pptx)?

ms-office,powerpoint,powerpoint-vba
I have checked MSDN and there seems to be no unique ID (UUID or whatnot) property in the Presentation object model ( https://msdn.microsoft.com/EN-US/library/office/ff746640(v=office.15).aspx ) According to the code example, a Presentation can only be identified by a name only. e.g. Presentations("Sample Presentation").Slides.Add 1, 1 Is there anyway I can identify...

Format too old or invalid type library in Chinese Excel 2010

c#,ms-office,vsto
Error came at Startup of Excel 2010 in Chinese MS Office . Error is as followS 格式太旧或类型程序库无效 . (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD) ) Please Assist ? ...

EWS java apis using Oauth2

java,oauth,ms-office,ews
I want to use Oauth2 authentication for my app. I want to use EWS Java apis to fetch data from O365. Is it possible? Document http://blogs.msdn.com/b/exchangedev/archive/2014/09/24/10510847.aspx talks about fetching oauth token for REST apis should I use same document to fetch token to be used with EWS web services also?...

excel - if cell is not blank, then do IF statement

excel,ms-office
I have this simple statement in excel. I compare two dates. If the date 2 is greater than or equal to date 1, then I show "1". If not, then I show "0". However, I would like to apply this function only when the cells contains text: IF(NOT(ISBLANK((Q2<=R2;"1";"0"))) That gives...

VSTO Outlook add-in, does UI manipulation need to be done from main thread?

multithreading,outlook,ms-office,vsto,add-in
I'm maintaining a VSTO add-in for Outlook, and it has a BackgroundWorker that handles syncing with a server. I want the worker to trigger user errors in the UI (changing the picture on a button, enabling a message in a settings window). Does UI manipulation need to be done from...

Changing #N/A values in Excel to last non-error value in the spreadsheet

excel,ms-office
I have a set of values that look like this: Time DataSet1 DataSet2 00:10:00 15 27 00:20:00 #N/A 25 00:30:00 33 45 00:40:00 #N/A #N/A 00:50:00 #N/A 25 01:00:00 #N/A 12 Now, I want to fill all #N/A values with the previous valid value in the table. For example: the...

VBA constant to identify 64 bit Office

vba,operating-system,ms-office
Is there some constant to identify whether Office is 32 bit or 64 bit? Something like this #If OfficeIs64Bit Then ' code for 64 bit Office #Else ' code for 32 bit Office #End If or am I completely misunderstanding this? It is possible to identify the OS architecture, but...

Opening CSV File

excel,csv,ms-office,excel-2013
I am generating CSV files. My first row it is column names, and it looks like User ID;First Name;Last Name;Email;... But if I will change User ID to ID, MS office cannot open this csv and shows me error "Cannot read record(number of record)". But this file opening correct on,...

Why does this operation break when turned into a function (AutoHotKey/AHK)

function,com,macros,ms-office,autohotkey
The following operation works correcting inside AHK. It replaces the word ted with the word tom inside an open word document. Working Code ; Word Constants vbTrue := -1 wdReplaceNone := 0 wdFindContinue := 1 return #IfWinActive, ahk_exe WINWORD.EXE ^7:: try oWord := ComObjActive("Word.Application") catch return FindText := "ted" ReplaceWith...

Data in Excel with OLEDB connection from access don't update when use LIKE operator

excel,ms-access,connection,ms-office,oledb
When I use LIKE operator in a Query in Access and I create a OLEDB connection in Excel to import this data to Excel, the data don't update even after change the query with another filter. Is like if I had not changed the query with the new filter. I...

Copy and Paste Hyperlink change path to absolute

hyperlink,ms-word,ms-office,copy-paste,word-2010
I just want to copy the Hyperlink from one Word document to another, but after copy/paste Word change address from relative to absolute. Explanation: In document_1.docx hyperlink is with this parameters: Text to display: This is link to the document Staff Address: files/staff.pdf After c/p in second document (or on...

How to Change the Color Scheme in a Docx document?

c#,ms-office
I want to know if it is possible to modify the colors of a document programatically using C#. After generating a document using the C# language, how can I modify the document theme color? I have tried to do it using a macro but that didn't worked....

Installing Microsoft Office on a windows server?

ms-office,windows-server-2008,office-interop
I could not google a straight simple answer to this, so i'm trying my luck here. is there a problem installing Microsoft office 2007\2010\2013 on a network windows-based server, to be able to do some server-side conversions and simple automatic operations using its inter ops libraries on user generated documents?...

How to read Math Equations from Powerpoint and write it to Word document in C#

c#,math,ms-office,powerpoint,office-interop
I am developing a PowerPoint extraction tool since march 2014 which extracts the words or paragraphs from PowerPoint and write it to word document. It has been developed. During the testing. we found that Math Equation has not being fetched from PowerPoint slide. I am using Microsoft.Office.Interop.Powerpoint.dll library. i am...

Iterate through Resource Graph view and export to XPS with resources name in VBA Microsoft Project 2010

vba,ms-office,ms-project,microsoft-project-vba
I am trying to iterate through the Resource Graph view one resource at a time and export to XPS with the appropriate name associated with the file. Here is the code: Sub ResourcGraph() ' Macro Macro4 ' Macro Recorded Tue 6/9/15 by Valencia, Jonathan. Dim Res As Resource ViewApply "Resource...

Getting Error code 403 while accessing Office 365 mail box for the client credential grant flow

ms-office,office365,office365-apps
I am trying to connect to Office 365 to use the client credential flow.I have followed all the steps as mentioned in http://blogs.msdn.com/b/exchangedev/archive/2015/01/21/building-demon-or-service-apps-with-office-365-mail-calendar-and-contacts-apis-oauth2-client-credential-flow.aspx I am trying to connect using the ADAL java library. Using the below code to connect and fetch mail: String authority = "https://login.windows.net/tenant-id/oauth2/authorize"; ExecutorService service = null;...

What is the difference between an MS office app and MS office add in

ms-office,outlook-addin,office365,office-addins,office-app
I was trying to find a way to publish an outlook add in to office store. But I found out that we can publish only office apps and not the add ins to the office store. Hence I wanted to know what is the difference between an office app and...

How can I make a custom fill handle pattern?

excel,reference,excel-formula,ms-office,excel-2011
I have a column A3:A71 I wish to populate with values =COUNTIF(B3:B71,B3) Where the second argument is incremented with every cell. Obviously I don't want to copy this function every time, so I was hoping that fill handle would help me. However although it correctly increments the second argument of...

VBA auto add text, next to a specific word in a cell

excel,vba,autocomplete,ms-office
I have been trying to do something theoretically simple, but I cant seem to finish it. I want whenever a cell has a specific single "word", to auto add a specific "word2" next to it on the left (previous column)....

Get item.recipient with Outlook VBA

vba,outlook,ms-office
I need to get the recipient email address out of an item on Outlook 2010. My code is as follow: sSQL = "SELECT id from dbo.database where email_address LIKE '" & Item.RecipientEmailAddress & "' item.recipientEmailAddress is not valid, but I need something like that. I know that you have a...

Addin custom menu in Microsoft Office

ms-office,ribbon,office-addins
I want to add a custom menu (addin) inside FileMenu after "New" menu in office 2010. Previously i have the similar add-in for Office 2007 but custumUI.xml has changed for office 2010 and 2013. I tried required changes but couldn't get the Menu in Office 2010 and 2013. Office 2007...

Excel - How do I return a color in a cell based on no value in a different cell?

excel,excel-vba,ms-office
I am trying to create a rule in Excel to change the color of one cell based on an empty value in a different cell on the same sheet. The basic premise is having the color change based on the tardiness of an assignment. Some of the assignments haven't been...

Will VSTO Work With Microsoft Office for Mac 2015

.net,visual-studio,ms-office,vsto,office-interop
With .NET coming to the Mac, I see no reason why support for VSTO (and therefore the ability to write cross platform office ad-ins) couldn't come with it. Have there been any announcements to this effect either way? I'm almost certain that they'll support their office web app platform, but...

excel - strip fields containing apostrophe

excel,ms-office
I have two cells in my excel sheet, where I compare them against each other. Now, it's a long sheet, and I have formatted all the date cells to "Short Date". However, some dates are entered like below: '02-02-2015 And others are entered without the ': 02-02-2015 Now, the problem...

Why a file starting with ~$ is created when opening a word document?

ms-word,ms-office
We all might have noticed the creation of a file named "~$filename.docx"(hidden) when opening filename.docx using MS Word What is the purpose of this file? Why is it created and what does it contain?...

Where can I find Microsoft.Office.Interop.Word.dll (2010)?

c#,.net,dll,interop,ms-office
I got the sources of a .NET project that I am trying to compile. Although, the project uses the reference (namespace) Microsoft.Office.Interop.Word from Office 2010 that I cannot find anywhere. I was able to download the file microsoft.office.interop.word.dll but apparently the one from Office 2007 since it still doesn't compile...

Accessing MS Outlooks Distribution lists

outlook,ms-office
We want to develope a special e-mail tool. One of its main features should be the ability to send mails to useres and distributions lists which are saved at Outlook. To make it short: Is there a possibility to access the distribuiton lists of Outlook from an external tool without...

Moving a value from 1 table to another

ms-access,ms-access-2007,ms-office,office-2007
What's the best way to do the following using access 2007? I want to move a value from 1 table to another. If table1 has the value 1000, I would like to move some of that value to table2. Lets say I want to move 50 to table2 from table1....

Microsoft Graph API Accessing basic info of a user that is outside tenancy

oauth,ms-office,ews,multi-tenant,azure-active-directory
I am developing a multi-tenant web app managing the mail, contacts and calendar of users. On the AzureAd management portal, I registered my app as multi-tenant and I manage to get OAuth tokens for both people out and inside my tenancy, replacing the tennantId by "common" when querying the Authentication...

Find all columns with name X and fill with values, but increment each column

excel,ms-office
I am using the newest excel. I have a structure such as this: | ID | Day | Value | Day | Value | Day | Value.............| Day | Value | 1 val val val val 2 val val val val 3 val val val val I need the data...

Excel line graph do not show next weeks with na()

excel,graph,ms-office
I have an excel grid with a weekly graph. The Value of the weekly graphs are all formulas and it looks like this: 19-Feb-15 314 26-Feb-15 319 5-Mar-15 356 12-Mar-15 #N/A 19-Mar-15 #N/A 26-Mar-15 #N/A If I select the line graph's value up to 26 March then it gives me...

Insert and activate a phone number in a generated word document

c++,vba,ms-word,ms-office
I would like to add a phone number to a word document that I generate using the mso api. In word, when one writes (Tel:00493298402938) and new line, the phone number is activated automatically. While trying to record the corresponding macro and check the VBA code, it doesn't show the...

Office 2010 monitoring calendar events

c#,vb.net,outlook,ms-office,office-interop
Hey all I have the following code in VB.net that i translated from C# that I found on the internet for monitoring a outlook calendar events (Add, modify and delete). The code is: Public Class ThisAddIn Private Sub ThisAddIn(sender As Object, e As System.EventArgs) Handles Me.Startup Dim monitor As New...