How do I hide a table in Word using VB or VBA

See

http://social.msdn.microsoft.com/Forums/en-US/worddev/thread/3ce3285e-0993-4d82-9d9f-eac30a18e4a6/

MyTable.Range.Font.Hidden = True

or

With ActiveDocument.Tables(1).Range.Font
.Hidden = Not .Hidden
End With

Be careful there are options in word to show/print hidden items.
In Word 2003 see Tools > Options > Print > Section “Include with Document” for option “Hidden Text”

Also Show/Hide mark up will show the table for developers.

 

Advertisements

Unable to apply publish properties for item “ApplicationCode\SystemNames.xml”

Solved with thanks to:

http://stackoverflow.com/questions/9284375/unable-to-apply-publish-properties-for-item-x

“It appears that the issue is related to ClickOnce. Navigate to the project, right click on it and click on properties. Go to the Publish tab and click on Application Files. Check the ‘Show all files’ checkbox and scroll through the list of files. Eventually, you will come across the file that has a yellow exclamation point on it. This file is orphaned and needs to be removed. Right click on the file and there should be a remove option.

Now build the solution and the warning should be gone.”

Error: The multi-part identifier could not be bound. when using a function and alias

You cannot pass parameters to functions across a JOIN.

http://stackoverflow.com/questions/4123413/the-multi-part-identifier-columnname-could-not-be-bound

Use APPLY:

SELECT ROW_NUMBER() OVER(ORDER BY x.Year DESC, x.Month) AS ID,
x.*,
fr.*
FROM (
SELECT Client,
Month(TimeStamp) As Month,
Year(TimeStamp) As Year,
Day(TimeStamp) As Day,
(dateadd(yy,(Year(TimeStamp)-1900),0)
+ dateadd(mm,Month(TimeStamp)-1,0)
+ Day(TimeStamp)-1) AS XTimeStamp,
Sum(KwTop) As KwTop,
Sum(KwHeap) as KwHeap,
Sum(KwLow) As KwLow
FROM Ori.vEnergyUnion
GROUP BY
Year(TimeStamp), Month(TimeStamp),Day(TimeStamp), Client
) x
OUTER APPLY
(
SELECT *
FROM Finance.fGetRates(x.XTimeStamp) Fr
WHERE fr.ValidFrom = x.XTimeStamp
) fr