I am trying to use Office Automation to open a word document.  The problem is that I would like to open it without invoking the Document_Open macro.  Is there a way to do this?  The relevant line below is wordApp.Documents.Open()  Imports Microsoft.Office.Interop  Public Class WordFunctions   Public Shared Function ConvertToDoc(ByVal file As String) As Boolean     Dim wordDoc As Word.Document     Dim wordApp As Word.Application      Try         wordApp = CreateObject("Word.Application", "")     Catch ex As Exception         Return False     End Try      Try         wordApp.Caption = "Automated Word Instance"         wordApp.DisplayAlerts = Word.WdAlertLevel.wdAlertsNone         wordDoc = wordApp.Documents.Open(FileName:=file, Visible:=False, ConfirmConversions:=False)          wordDoc.SaveAs(FileName:=file + ".doc", FileFormat:=Word.WdSaveFormat.wdFormatDocument)         wordDoc.Activate()         wordDoc.Close()         Return True     Catch ex As Exception         Return False     Finally         wordApp.Quit(SaveChanges:=False)     End Try   End Function End Class
I have an Excel file that has a bunch of VBA and macro code in it.  When I open the file in Excel I can choose not to 'enable' them - so the values in the fields all stay as they were during the last save.  I need to manipulate the values as they were last saved - so I don't want the macros (which look at the current date and update values accordingly) to run.  When I open it via our dot net code:   Dim oxlRep As Excel.Application Dim oWBRep As Excel.Workbook Dim oSheetRep As Excel.Worksheet Dim oRngRep As Excel.Range oxlRep.Open(path)   the vb code runs - throwing off the values.  I've been looking for a way to open it without macros, or in 'secure' mode where the macros aren't run.  If I simply double click the file and don't choose to enable macros the values are all there as I want them.    Usually we run this code within the month that the files are created, so we haven't seen this problem in the 3 or 4 years that it has been working.  Now I need to go back to some of the old files and run some archival code...    Anyone have a suggestion?
Show that $(2,0,4) , (4,1,-1) , (6,7,7)$ form a right triangle What I tried:  Let $A(2,0,4)$, $B(4,1,-1)$, $C(6,7,7)$ then  $$\vec{AB}=(2,1,-5), \vec{AC}=(4,7,3), \vec{BC}=(2,6,8)$$  Then I calculated the angle between vectors:  $$\begin{aligned} \alpha_1 &amp;= \cos^{-1}\left(\frac{(2,1,-5)(4,7,3)}{\sqrt{2^2+1^2+(-5)^2}\sqrt{4^2+7^2+3^2}}\right) \\ &amp;= \cos^{-1}(0)=90° \\ \alpha_2 &amp;= \cos^{-1}\left(\frac{(4,7,3)(2,6,8)}{\sqrt{4^2+7^2+3^2}\sqrt{2^2+6^2+8^2}}\right) \\ &amp;= \cos^{-1}\left(\frac{74}{\sqrt{74}\sqrt{104}}\right)=32.49\\ \alpha_3 &amp;= \cos^{-1}\left(\frac{(2,6,8)(2,1,-5)}{\sqrt{2^2+6^2+8^2}\sqrt{2^2+1^2+(-5)^2}}\right) \\ &amp;= \cos^{-1}\left(\frac{-30}{\sqrt{104}\sqrt{30}}\right)=122.5° \end {aligned}$$  As you can see, these angles don't even form a triangle, what am I doing wrong, any thoughts? How to prove that the center of the dihedral group $D_{2n}$ is $\{1,r^{n}\}$ and the center of $D_{2n-1}$ is $\{1\}$?  I don't know how to prove it in this general case. What's the difference between postfix/smtp and postfix/smtpd A bit confused when reading through the logs of my smtp/mail server, I'm turning this questions to you guys.   In the maillog files I'm seeing entries for postfix/smtp as well as postfix/smtpd. I can also see that there are possible settings for smtp as well as smtpd in the file main.cf  Trying to find some reasonable explanation through google search seemed to be impossible, so here is my question to you guys.  My server was kind of compromised and the spam mails where going through postfix/smtp and not smtpd. Please help me to understand. Thanks in advance! Understanding a derivation of bias correction for the Adam optimizer I'm reading  about the Adam optimizer and went up until the bias-correction section; in the paper they estimate the bias of the moving average of the squared gradient. These are the equations they use:    Where $v_{t}$ is the moving average of gradient squared, $g_{i}$ is gradient at the $i^{th}$ iteration and $\beta_{2}$ is a moving average parameter.  I don't understand how they make any of these transitions from the first row to the second and on to the third one. Could someone explain what rules are allowing them to do so ? Starting scheduled task by detecting connection of USB device I know it has been discussed that it is not possible to start an application from an usb drive upon connection due to limitations of autorun (or autoplay??) in Win 7. But it is possible to create a scheduled task having an event type trigger. Surely there must be an event occurring when the drive -- or any USB device, for that matter -- is connected.    Does anybody have the slightest idea which Event ID should I use? Or at least what type of event? Where can I find the event in event viewer? What's the most efficient way of determine individual card values for my collection? Rounded caps on a Bezier Curve pipe This may be a simple question.  Essentially I am procedurally generating random 3D figures using a bezier curve and bezier circle bevel object, however, one of the only things I can't figure out how to do is how to round the end caps of the object.   I have tried using a taper object like suggested  but have had only limited success.  This is about as close as I've gotten:   I should note that all of this is done through Python and I'm not modeling any of this by hand. So any suggestions for how I can make the rounded caps programmatically would be greatly appreciated. Ways of getting three of a kind in a 52 card deck This question has probably been asked before, but just to be clear here, I am NOT asking for the answer, I know the answer.  What i want to know is why my solution is not equivalent to the actual solution.  Three of a kind in a deck means you draw 3 cards of the same rank, and 2 other cards each of different ranks.  So. The solution in my book is the following: (13 C 1)(4 C 3) * (12 C 2)(4 C 1)(4 C 1)  The logic is the following:  1) Choose 1 out of the 13 ranks, then for the 4 cards in the chosen rank, pick 3.  2) Choose a combination of 2 ranks from the remaining 12, then for the 4 cards in each rank, choose 1.  Total combinations: 54912  My solution is the following:  ((13 C 1)(4 C 3)) * ((12 C 1)(4 C 1)) * ((11 C 1)(4 C 1))  1) My logic for the 3 of a kind is the same as the solution.   2) Choose 1 of the remaining 12 ranks, and 1 card from the 4 cards in the rank.  3) Choose 1 of the remaining 11 ranks, and 1 card from the 4 cards in the rank.  Total combinations: 109824  My solution says that the combinations are exactly double of the book's solution.  I'm just very confused as to why this is. If anyone could explain this to me I would be very appreciative, thank you. I was wondering why I couldn't delete my own question. Well actually, I have accepted the question itself to be wrong and even I feel that I have accepted a wrong answer, but when I try to delete my question, I get a message saying that,"This question can't be deleted, flag it for moderator attention". Why is this happening and how can I solve this? LWC to display salesforce objects as a picklist onclick I have a requirement where I need to display list of salesforce objects as a picklist when a radio button is clicked.  Being new to LWC development, I could not figure out what is the right approach to do so. I have come across  from Salesforce articles where we can display radio buttons but as per my scenario, i need to display list of all salesforce objects as picklist when a radio button option is selected.  Can anyone please suggest the right approach to do so. Help Understanding How Long It Will Take To Heat My Wire How can I re install the APT Tool? Three-columns text with figures of 2\columnwidth Solve the equation $x^3 + 117y^3 = 5$ over the integers. I asked a question  but, rather stupidly, added extra information after it had been answered.  My additional question is this: I have a table with varying lengths of words. I want to encircle different groups of cells, including diagonals. If possible, it would be great if the rectangles don't overlap each other where possible.  I looked at the answer , which, whilst tedious, worked except for the overlap.    This is where I've got to so far:  \documentclass[fleqn,12pt,a4paper,landscape]{article}  \usepackage{tikz} \usepackage{tabularx}  \begin{document}  % Introduce a new counter for counting the nodes needed for circling \newcounter{nodecount} % Command for making a new node and naming it according to the nodecount     counter \newcommand\tabnode[1]{\addtocounter{nodecount}{1} \tikz \node     (\arabic{nodecount}) {#1};}  % Some options common to all the nodes and paths \tikzstyle{every picture}+=[remember picture,baseline] \tikzstyle{every node}+=[inner sep=0pt,anchor=base, minimum width=1.8cm,align=center,text depth=.25ex,outer sep=1.5pt] \tikzstyle{every path}+=[thick, rounded corners]  \begin{table}[ht]   \begin{minipage}[b]{1 \linewidth}\centering    \begin{tabular}{cccccc} % Turn the cells needed for defining the circling paths into nodes with our     custom command \tabnode{Long ago}&amp; \tabnode{A few days ago}&amp; \tabnode{Day before         yesterday}&amp; \tabnode{Yesterday} &amp;  &amp;  \\      &amp; &amp; &amp;  &amp; \tabnode{Today} &amp; \tabnode{Now}\\      \tabnode{Long time in the future}&amp; \tabnode{A few days on}&amp;     \tabnode{Day after tomorrow}&amp; \tabnode{Tomorrow} &amp;  &amp; \\      \end{tabular}    \end{minipage}   \begin{tikzpicture}[overlay] % Define the circle paths \draw [blue](1.north west) -- (1.north east) -| (7.north east) |- (7.south     west) |- (1.north west); \draw [red](8.south west) -| (2.north east) -| (2.south west) |- (8.south     west); \draw [yellow](9.south west) -| (3.north east) -| (3.south west) |- (9.south     west); \draw [green](8.south west) -| (3.north east) -| (2.south west) |- (8.south     west);   \end{tikzpicture}  \end{table} \end{document}  %%% Local Variables:  %%% mode: latex %%% TeX-master: t %%% End: NRPE unable to read output, but why? Given the following code, what does the if __name__ == "__main__": do?  # Threading example import time, thread  def myfunction(string, sleeptime, lock, *args):     while True:         lock.acquire()         time.sleep(sleeptime)         lock.release()         time.sleep(sleeptime)  if __name__ == "__main__":     lock = thread.allocate_lock()     thread.start_new_thread(myfunction, ("Thread #: 1", 2, lock))     thread.start_new_thread(myfunction, ("Thread #: 2", 2, lock)) I keep running into areas where I see a chest in a section of the room that seems completely walled-off. Is there any way to get to these, or is that just the randomly generated dungeon being a tease?  I had to splice two screenshots together to show an example of what I'm talking about:   Is there any way to get in there? What do \makeatletter and \makeatother do? Many LaTeX “hacks” begin with \makeatletter and end with \makeatother. What do these commands do? Iterating through columns in table using ModelBuilder? I am unable to find any info on how to use ModelBuilder to run a certain spatial analysis function on each column in a table.  I have a table to sample locations and at each location there are a series of measures (e.g. temperature, flow rate, number of certain species).  For each of those attributes (columns in the table), I was to run the IDW function from the surface tools.  This would be easy if I had each attribute in a separate shp/feature class, but not very efficient.  I tried Iterate Feature Selection, but was unable to pass the field name as the Z value in the IDW function.  This is for ArcGIS 10.1 (Basic and Spatial Analyst license)