How to open an 'incognito' window from Microsoft Excel? - excel

I've created links to the web in Excel but I need to find a solution how to open an 'incognito' window in my 'default' Chrome browser.

I found a way to accomplish this. Create a desktop shortcut. In that shortcut have it direct to the browser. I did it with Chrome, so mine looked like:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
Then after the link to the browser is done add the switch to open in Incognito (may differ for browser). For Chrome it is -incognito
You then add the link you want to open, placing it inside quotes.
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -incognito "http://yourlinkhere.com"
In Excel you will link to the shortcut. It will give you warning boxes but those are easy enough to close. If anyone knows how to make a macro to disable them for just this click then I would like to know.

Below code works
Sub OpenIncognito()
Shell ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe -incognito -url https://google.com")
End Sub

Related

How do I open an Excel spreadsheet in a separate instance without opening in Protected View?

I've come across an issue at work where I have a spreadsheet that needs to open in its own instance - it's a very complex modelling spreadsheet that does lots of processing using external DLL functions, so using other operational spreadsheets in the same instance is impractical.
I can open this spreadsheet directly from Explorer and it works fine, and I can create a shortcut directly to the spreadsheet and it works fine, but I can't open it in its own instance without a shortcut using the '/x' command line switch on the Excel.exe.
The problem is, when I have the shortcut directed to Excel.exe to open the spreadsheet, then Excel seems to think it's "downloading" the file and always opens in Protected View. Once it's opened in Protected View I can click "Enable Editing" but it then freaks out and breaks (I could describe how it freaks out and breaks but I'm confident there isn't a solution in down this avenue).
A workaround I have found is to go to Excel Protected View settings and disable Protected View for files originating from the internet. Why a shortcut to the Excel.exe loading the spreadsheet makes it treat it as a file from the internet I have no idea, but it works. The only problem with this solution is that it will now allow files actually downloaded from the internet to open without Protected View, which is far from ideal security-wise.
Does anyone know of a policy or setting that may impact this behaviour other than the setting I just mentioned?
Additional things I've tried:
Disabling other Protected View settings in Excel - no change.
Running the same command ("Excel.exe spreadsheet.xlsm /x") from Powershell or a .bat file - no change.
Having the spreadsheet and shortcut located from both network and local (C:) folders.
Googling - can't find anyone mentioning the same issue.
Running Office 365 x64.
Thanks in advance!
Alright so this is a little annoying, but I found the solution. By explicitly referencing the path of the spreadsheet in the shortcut 'Target', Excel will load it without going into Protected View. I don't know why it works that way and not the way I tried it, but that's the way it is.
In summary, using a command like this does not work:
"C:\Program Files\Microsoft Office\root\Office16\Excel.exe" /x Spreadsheet.xlsx
even if the file is located in the same folder as the shortcut and the 'Start in' parameter of the shortcut is also the same folder.
However, using a command like this does work:
"C:\Program Files\Microsoft Office\root\Office16\Excel.exe" /x "C:\Users\Bob\Documents\Spreadsheet.xlsx"
despite only seemingly cosmetic differences, because the spreadsheet path is explicitly referenced.
Hopefully that helps someone else at some point as well

How to open .xlsx files in MS Excel from VS Code?

Is there a way to open certain files like xlsx/docx in external apps (preferably system defaults) from VS Code Explorer instead of just opening another tab in VS Code?
I want to be able to open xlsx/docx etc. in MS Office Apps by double clicking from the explorer, if that's possible at all.
After installing the extension called open, you can open ms files by default app with right click. (But it does not work in WSL)
Check this extension - both .docx and .xlsx are working good and you can even edit them.
Example of .docx:
Example of .xlsx:
If you want to open .xlsx files within vs code then this tool does the job. It is much faster then loading Excel I find.
Excel Viewer

How to create an add-on and share it with other people?

I have created a few macros with the help of this community the last week, but now I am going to be off work for some time, therefore I need to hand my work over but for that people will need access to my macros. I have created a custom tab for myself that contains all my macros and they only need to follow instructions and click on them in theory.
I however, had issues creating that add-in. I have created the .xlam file but even though people select and load it my macros won't appear, neither at the developer -> Macros tab, nor my tab will appear. The only way for them to run my macros if the add-in is loaded if they go into the visual basic window and run it from there, but I don't want them to do that as I want to protect that with a password eventually.
If somebody has got a solution and willing to help, thanks in advance.
Into the Visual Basic window, you can import your .xlam file with Tools > References > Browse. Now, you should see your file into the Project Explorer of Visual Basic.
Hope this help !
There are couple of different ways you can install an Excel .xlam add-in.
Method One
Save the add-in Excel's start-up folder. Any Excel files saved in this folder are automatically loaded when Excel starts. To view the start-up path:
Open the Visual Basic window.
Open the Immediate Window (Ctrl + G or View >> Immediate Window).
Type ? Application.StartupPath.
You can also change the start-up path:
Click File >> Excel Options >> Advanced.
Under General, in the At Startup, open all files in box, type the full path of the folder that you want to use as the alternate startup folder.
Method Two
You can install the add-in directly:
Click File >> Options >> Add-ins
Pick Excel Add-ins from the manage drop-down (near the bottom of the screen).
Press Go >> Browse...
Navigate to the .xlam add-in you want to use.

Shortcut for reload jscript file

I am using notepad++ for jscript file editing and TestComplete for automation testing which uses the JScript files, but every time i exit and start the TestComplete whenever i change anything in Jscript file.
is there any short-cut-Key to reload without closing the TestComplete.
So, you are creating a script extension. Thank you for clarification. I have checked the Tools | Customize Keyboard... dialog and there is no a possibility to assign a shortcut to the Reload Script Extensions action. So, you can do this only by manually clicking the Reload button in the Script Extensions dialog. The Alt-F-E shortcut just opens this dialog (File | Install Script Extensions...).
http://www.philnicholas.com/2009/05/11/reloading-your-javascript-without-reloading-your-page/
This page explains what you're looking for, I think. All you need to do is change the event to when ur shortcut key is pressed.

Can't save php.ini

I have PHP for FastCGI installed on Windows 7 through the Web Platform Installer. I need to edit php.ini to enable logging, but I'm not able to overwrite the existing file, apparently because something has it open and/or locked.
Stopping the server in IIS Manager doesn't help; stopping the Windows Process Activation Service and the World Wide Web Publishing Service doesn't help. phpinfo() confirms that I'm working with the correct file (C:\Program Files (x86)\PHP\php.ini). It's not marked as read only and I do have permissions for it. I'm out of ideas.
I had this problem and managed to work around it. You need to be running the editor (notepad or whatever) as an admin.
In Window Vista / Window 7, right click and choose "Run as Administrator".
Then open php.ini and edit it...
Another option is to copy the text of the file into a new file in a different location, make your changes, save the file as 'php.ini'. Then copy the new file across overwriting the old one. Explorer may handle the permissions differently.
I've had a similar problem, and I was working in windows 10 which doesn't use "run as administrator"
So this is what I did:
right click the problem file and go to properties
go to tab security
click edit, which should have a shield
select in names of groups: Users(computer specifics\Users)
in the square under it you can allow editing of the file
This causes it to allow you to edit the file for users and not run into the problem anymore. This also removes the problem in the future for this file so you can always edit it again by just opening the file in text editor.
Please note I am Dutch and that certain names are translated incorrectly.
You could use the Find Handle feature of Process Explorer (direct EXE download link), from Sysinternals (a part of Microsoft now), to find out what exactly is locking the file.
I'm sorry I can't help with your exact question, but hope that helps!
In Windows 7, right click Notepad and choose "Run as Administrator". Make sure you do not use Notepad++ as your editor. It accesses this file and therefore tells you there's is an error.
The default notepad will work fine with these instructions.
Depending on what are you trying to write to the file, you can write to an '.htaccess' file on the root of the site instead. I can provide a more specific example if you would like.
You can also use Unlocker to figure this out. A pain, but the utility is really handy anyway so it won't hurt to have it around.
1) Open CMD with administrator mostly like this.
2) Then go to "C:\Program Files\php-8.1.7" like this.
3) then paste "cd C:\Program Files\php-8.1.7" and press Enter and type
php.ini like this.
4) It will automatically open the file in a text editor or suggest to
open any editor like notepad , notepad++,vs code etc.
5) edit as you wish and save it like (ctrl + s) .Here I adding MongoDB
extension like this .And that's it.
By the way the question was asked 12 years ago but we still facing the problem
Try this:
Stop the webserver
Change the file
Start the webserver
If that doesn't work, then you are probably changing the wrong file. It's possible that the original file is elsewhere and when the server starts it copies it to C:\Program Files (x86)\PHP\php.ini. phpinfo() might be pointing to the file that is overwritten every time...

Resources